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.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
-
#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.
133 134 135 136 137 138 139 140 141 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 133 def initialize(class_name, name) @class_name = class_name @name = name @failure = @error = @omission = @pending = nil @stdout = StringIO.new @stderr = StringIO.new @assertion_count = 0 @time = 0 end |
Instance Attribute Details
#assertion_count ⇒ Object
Returns the value of attribute assertion_count.
131 132 133 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 131 def assertion_count @assertion_count end |
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
128 129 130 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 128 def class_name @class_name end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
129 130 131 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 129 def error @error end |
#failure ⇒ Object (readonly)
Returns the value of attribute failure.
129 130 131 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 129 def failure @failure end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
128 129 130 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 128 def name @name end |
#omission ⇒ Object (readonly)
Returns the value of attribute omission.
129 130 131 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 129 def omission @omission end |
#pending ⇒ Object (readonly)
Returns the value of attribute pending.
129 130 131 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 129 def pending @pending end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
130 131 132 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 130 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
130 131 132 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 130 def stdout @stdout end |
#time ⇒ Object
Returns the value of attribute time.
131 132 133 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 131 def time @time end |
Instance Method Details
#<<(fault) ⇒ Object
143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 143 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
157 158 159 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 157 def skipped? @omission || @pending end |