Class: JmlTestRunner::Suite
- Inherits:
-
Object
- Object
- JmlTestRunner::Suite
- Defined in:
- lib/jml_test_runner/suite.rb
Instance Attribute Summary collapse
-
#raw_input ⇒ Object
readonly
Returns the value of attribute raw_input.
-
#tests ⇒ Object
readonly
Returns the value of attribute tests.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #count ⇒ Object
- #error_count ⇒ Object
- #failure_count ⇒ Object
-
#initialize(raw) ⇒ Suite
constructor
A new instance of Suite.
- #pass_count ⇒ Object
Constructor Details
#initialize(raw) ⇒ Suite
Returns a new instance of Suite.
8 9 10 11 12 13 |
# File 'lib/jml_test_runner/suite.rb', line 8 def initialize(raw) @raw_input = Hash.from_xml(raw) @tests = [] return unless @raw_input['testsuites'] parse_raw_xml end |
Instance Attribute Details
#raw_input ⇒ Object (readonly)
Returns the value of attribute raw_input.
7 8 9 |
# File 'lib/jml_test_runner/suite.rb', line 7 def raw_input @raw_input end |
#tests ⇒ Object (readonly)
Returns the value of attribute tests.
7 8 9 |
# File 'lib/jml_test_runner/suite.rb', line 7 def tests @tests end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
7 8 9 |
# File 'lib/jml_test_runner/suite.rb', line 7 def end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
7 8 9 |
# File 'lib/jml_test_runner/suite.rb', line 7 def title @title end |
Instance Method Details
#count ⇒ Object
27 28 29 |
# File 'lib/jml_test_runner/suite.rb', line 27 def count @tests.count end |
#error_count ⇒ Object
23 24 25 |
# File 'lib/jml_test_runner/suite.rb', line 23 def error_count @tests.count { |t| t.result == :error } end |
#failure_count ⇒ Object
15 16 17 |
# File 'lib/jml_test_runner/suite.rb', line 15 def failure_count @tests.count { |t| t.result == :failure } end |
#pass_count ⇒ Object
19 20 21 |
# File 'lib/jml_test_runner/suite.rb', line 19 def pass_count @tests.count { |t| t.result == :success } end |