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.
115 116 117 118 119 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 115 def initialize(name) @name = name @time = 0 @test_cases = [] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
112 113 114 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 112 def name @name end |
#test_cases ⇒ Object (readonly)
Returns the value of attribute test_cases.
112 113 114 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 112 def test_cases @test_cases end |
#time ⇒ Object
Returns the value of attribute time.
113 114 115 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 113 def time @time end |
Instance Method Details
#<<(test_case) ⇒ Object
121 122 123 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 121 def <<(test_case) @test_cases << test_case end |
#errors ⇒ Object
129 130 131 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 129 def errors @test_cases.map(&:error).compact end |
#failures ⇒ Object
125 126 127 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 125 def failures @test_cases.map(&:failure).compact end |