Class: Drntest::TestSuitesResult
- Inherits:
-
Object
- Object
- Drntest::TestSuitesResult
- Defined in:
- lib/drntest/test-suites-result.rb
Instance Attribute Summary collapse
-
#test_results ⇒ Object
Returns the value of attribute test_results.
Instance Method Summary collapse
-
#initialize ⇒ TestSuitesResult
constructor
A new instance of TestSuitesResult.
- #success? ⇒ Boolean
- #summary ⇒ Object
Constructor Details
#initialize ⇒ TestSuitesResult
Returns a new instance of TestSuitesResult.
20 21 22 |
# File 'lib/drntest/test-suites-result.rb', line 20 def initialize @test_results = [] end |
Instance Attribute Details
#test_results ⇒ Object
Returns the value of attribute test_results.
18 19 20 |
# File 'lib/drntest/test-suites-result.rb', line 18 def test_results @test_results end |
Instance Method Details
#success? ⇒ Boolean
32 33 34 |
# File 'lib/drntest/test-suites-result.rb', line 32 def success? summary[:failure].zero? && summary[:no_response].zero? end |
#summary ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/drntest/test-suites-result.rb', line 24 def summary status_counts = Hash.new(0) test_results.each do |result| status_counts[result.status] += 1 end status_counts end |