Class: Drntest::TestSuitesResult

Inherits:
Object
  • Object
show all
Defined in:
lib/drntest/test-suites-result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTestSuitesResult

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_resultsObject

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

Returns:

  • (Boolean)


32
33
34
# File 'lib/drntest/test-suites-result.rb', line 32

def success?
  summary[:failure].zero? && summary[:no_response].zero?
end

#summaryObject



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