Class: Test::Unit::UI::JUnitXml::JUnitTestCase
- Inherits:
-
Object
- Object
- Test::Unit::UI::JUnitXml::JUnitTestCase
- Defined in:
- lib/test/unit/ui/junitxml/testrunner.rb
Instance Attribute Summary collapse
-
#assertion_count ⇒ Object
Returns the value of attribute assertion_count.
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#failure ⇒ Object
readonly
Returns the value of attribute failure.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#omission ⇒ Object
readonly
Returns the value of attribute omission.
-
#pending ⇒ Object
readonly
Returns the value of attribute pending.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
- #<<(fault) ⇒ Object
-
#initialize(class_name, name) ⇒ JUnitTestCase
constructor
A new instance of JUnitTestCase.
- #skipped? ⇒ Boolean
Constructor Details
#initialize(class_name, name) ⇒ JUnitTestCase
Returns a new instance of JUnitTestCase.
121 122 123 124 125 126 127 128 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 121 def initialize(class_name, name) @class_name = class_name @name = name @assertion_count = 0 @time = 0 @omission = nil @pending = nil end |
Instance Attribute Details
#assertion_count ⇒ Object
Returns the value of attribute assertion_count.
119 120 121 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 119 def assertion_count @assertion_count end |
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
117 118 119 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 117 def class_name @class_name end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
118 119 120 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 118 def error @error end |
#failure ⇒ Object (readonly)
Returns the value of attribute failure.
118 119 120 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 118 def failure @failure end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
117 118 119 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 117 def name @name end |
#omission ⇒ Object (readonly)
Returns the value of attribute omission.
118 119 120 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 118 def omission @omission end |
#pending ⇒ Object (readonly)
Returns the value of attribute pending.
118 119 120 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 118 def pending @pending end |
#time ⇒ Object
Returns the value of attribute time.
119 120 121 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 119 def time @time end |
Instance Method Details
#<<(fault) ⇒ Object
130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 130 def <<(fault) # Notification is ignored case fault when Failure @failure = fault when Error @error = fault when Omission @omission = fault when Pending @pending = fault end end |
#skipped? ⇒ Boolean
144 145 146 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 144 def skipped? @omission || @pending end |