Module: Test::Unit::TestResultFailureSupport
- Included in:
- TestResult
- Defined in:
- 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.
137 138 139 |
# File 'lib/test/unit/failure.rb', line 137 def failures @failures end |
Instance Method Details
#add_failure(failure) ⇒ Object
Records a Test::Unit::Failure.
140 141 142 143 144 |
# File 'lib/test/unit/failure.rb', line 140 def add_failure(failure) @failures << failure notify_fault(failure) notify_changed end |
#failure_count ⇒ Object
Returns the number of failures this TestResult has recorded.
148 149 150 |
# File 'lib/test/unit/failure.rb', line 148 def failure_count @failures.size end |
#failure_occurred? ⇒ Boolean
152 153 154 |
# File 'lib/test/unit/failure.rb', line 152 def failure_occurred? not @failures.empty? end |