module Test::Unit::TestResultFailureSupport

Attributes

failures[R]

Public Instance Methods

add_failure(failure) click to toggle source

Records a Test::Unit::Failure.

# File test-unit-3.6.4/lib/test/unit/failure.rb, line 140
def add_failure(failure)
  @failures << failure
  notify_fault(failure)
  notify_changed
end
failure_count() click to toggle source

Returns the number of failures this TestResult has recorded.

# File test-unit-3.6.4/lib/test/unit/failure.rb, line 148
def failure_count
  @failures.size
end
failure_occurred?() click to toggle source
# File test-unit-3.6.4/lib/test/unit/failure.rb, line 152
def failure_occurred?
  not @failures.empty?
end

Private Instance Methods

failure_summary() click to toggle source
# File test-unit-3.6.4/lib/test/unit/failure.rb, line 164
def failure_summary
  "#{failure_count} failures"
end
initialize_containers() click to toggle source
Calls superclass method
# File test-unit-3.6.4/lib/test/unit/failure.rb, line 157
def initialize_containers
  super
  @failures = []
  @summary_generators << :failure_summary
  @problem_checkers << :failure_occurred?
end