Class: Test::Unit::UI::JUnitXml::JUnitTestSuite
- Inherits:
-
Object
- Object
- Test::Unit::UI::JUnitXml::JUnitTestSuite
- Defined in:
- lib/test/unit/ui/junitxml/testrunner.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#test_cases ⇒ Object
readonly
Returns the value of attribute test_cases.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
- #<<(test_case) ⇒ Object
- #errors ⇒ Object
- #failures ⇒ Object
-
#initialize(name) ⇒ JUnitTestSuite
constructor
A new instance of JUnitTestSuite.
Constructor Details
#initialize(name) ⇒ JUnitTestSuite
Returns a new instance of JUnitTestSuite.
108 109 110 111 112 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 108 def initialize(name) @name = name @time = 0 @test_cases = [] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
105 106 107 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 105 def name @name end |
#test_cases ⇒ Object (readonly)
Returns the value of attribute test_cases.
105 106 107 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 105 def test_cases @test_cases end |
#time ⇒ Object
Returns the value of attribute time.
106 107 108 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 106 def time @time end |
Instance Method Details
#<<(test_case) ⇒ Object
114 115 116 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 114 def <<(test_case) @test_cases << test_case end |
#errors ⇒ Object
122 123 124 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 122 def errors @test_cases.map(&:error).compact end |
#failures ⇒ Object
118 119 120 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 118 def failures @test_cases.map(&:failure).compact end |