Module: Test::Unit::TestResultFailureSupport
- Included in:
- TestResult
- Defined in:
- lib/test/unit/failure.rb,
lib/test/unit/failure.rb
Instance Attribute Summary collapse
-
#failures ⇒ Object
readonly
Returns the value of attribute failures.
Instance Method Summary collapse
-
#add_failure(failure) ⇒ Object
Records a Test::Unit::Failure.
-
#failure_count ⇒ Object
Returns the number of failures this TestResult has recorded.
-
#failure_occurred? ⇒ Boolean
Instance Attribute Details
#failures ⇒ Object (readonly)
Returns the value of attribute failures
131 132 133 |
# File 'lib/test/unit/failure.rb', line 131 def failures @failures end |
Instance Method Details
#add_failure(failure) ⇒ Object
Records a Test::Unit::Failure.
134 135 136 137 138 |
# File 'lib/test/unit/failure.rb', line 134 def add_failure(failure) @failures << failure notify_fault(failure) notify_changed end |
#failure_count ⇒ Object
Returns the number of failures this TestResult has recorded.
142 143 144 |
# File 'lib/test/unit/failure.rb', line 142 def failure_count @failures.size end |
#failure_occurred? ⇒ Boolean
146 147 148 |
# File 'lib/test/unit/failure.rb', line 146 def failure_occurred? not @failures.empty? end |