Module: Test::Unit::TestResultFailureSupport
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/test/unit/failure.rb |
Instance Attribute Summary
- #failure_occurred? ⇒ Boolean readonly
- #failures readonly
Instance Method Summary
-
#add_failure(failure)
Records a
Failure
. -
#failure_count
Returns the number of failures this
TestResult
has recorded. - #failure_summary private
- #initialize_containers private
Instance Attribute Details
#failure_occurred? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/test/unit/failure.rb', line 152
def failure_occurred? not @failures.empty? end
#failures (readonly)
[ GitHub ]# File 'lib/test/unit/failure.rb', line 137
attr_reader :failures
Instance Method Details
#add_failure(failure)
Records a Failure
.
# File 'lib/test/unit/failure.rb', line 140
def add_failure(failure) @failures << failure notify_fault(failure) notify_changed end
#failure_count
Returns the number of failures this TestResult
has recorded.
# File 'lib/test/unit/failure.rb', line 148
def failure_count @failures.size end
#failure_summary (private)
[ GitHub ]# File 'lib/test/unit/failure.rb', line 164
def failure_summary "#{failure_count} failures" end
#initialize_containers (private)
[ GitHub ]# File 'lib/test/unit/failure.rb', line 157
def initialize_containers super @failures = [] @summary_generators << :failure_summary @problem_checkers << :failure_occurred? end