Module: Test::Unit::TestResultErrorSupport
- Included in:
- TestResult
- Defined in:
- lib/test/unit/error.rb,
lib/test/unit/error.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#add_error(error) ⇒ Object
Records a Test::Unit::Error.
-
#error_count ⇒ Object
Returns the number of errors this TestResult has recorded.
-
#error_occurred? ⇒ Boolean
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors
120 121 122 |
# File 'lib/test/unit/error.rb', line 120 def errors @errors end |
Instance Method Details
#add_error(error) ⇒ Object
Records a Test::Unit::Error.
123 124 125 126 127 |
# File 'lib/test/unit/error.rb', line 123 def add_error(error) @errors << error notify_fault(error) notify_changed end |
#error_count ⇒ Object
Returns the number of errors this TestResult has recorded.
131 132 133 |
# File 'lib/test/unit/error.rb', line 131 def error_count @errors.size end |
#error_occurred? ⇒ Boolean
135 136 137 |
# File 'lib/test/unit/error.rb', line 135 def error_occurred? not @errors.empty? end |