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.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#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, file) ⇒ JUnitTestCase
constructor
A new instance of JUnitTestCase.
- #skipped? ⇒ Boolean
Constructor Details
#initialize(class_name, name, file) ⇒ JUnitTestCase
Returns a new instance of JUnitTestCase.
140 141 142 143 144 145 146 147 148 149 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 140 def initialize(class_name, name, file) @class_name = class_name @name = name @file = file @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.
138 139 140 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 138 def assertion_count @assertion_count end |
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
135 136 137 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 135 def class_name @class_name end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
136 137 138 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 136 def error @error end |
#failure ⇒ Object (readonly)
Returns the value of attribute failure.
136 137 138 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 136 def failure @failure end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
135 136 137 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 135 def file @file end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
135 136 137 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 135 def name @name end |
#omission ⇒ Object (readonly)
Returns the value of attribute omission.
136 137 138 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 136 def omission @omission end |
#pending ⇒ Object (readonly)
Returns the value of attribute pending.
136 137 138 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 136 def pending @pending end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
137 138 139 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 137 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
137 138 139 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 137 def stdout @stdout end |
#time ⇒ Object
Returns the value of attribute time.
138 139 140 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 138 def time @time end |
Instance Method Details
#<<(fault) ⇒ Object
151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 151 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
165 166 167 |
# File 'lib/test/unit/ui/junitxml/testrunner.rb', line 165 def skipped? @omission || @pending end |