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.
104 105 106 |
# File 'lib/test/unit/failure.rb', line 104 def failures @failures end |
Instance Method Details
#add_failure(failure) ⇒ Object
Records a Test::Unit::Failure.
107 108 109 110 111 |
# File 'lib/test/unit/failure.rb', line 107 def add_failure(failure) @failures << failure notify_fault(failure) notify_changed end |
#failure_count ⇒ Object
Returns the number of failures this TestResult has recorded.
115 116 117 |
# File 'lib/test/unit/failure.rb', line 115 def failure_count @failures.size end |
#failure_occurred? ⇒ Boolean
119 120 121 |
# File 'lib/test/unit/failure.rb', line 119 def failure_occurred? not @failures.empty? end |