module Test::Unit::TestResultErrorSupport

Attributes

errors[R]

Public Instance Methods

add_error(error) click to toggle source

Records a Test::Unit::Error.

# File test-unit-3.6.2/lib/test/unit/error.rb, line 129
def add_error(error)
  @errors << error
  notify_fault(error)
  notify_changed
end
error_count() click to toggle source

Returns the number of errors this TestResult has recorded.

# File test-unit-3.6.2/lib/test/unit/error.rb, line 137
def error_count
  @errors.size
end
error_occurred?() click to toggle source
# File test-unit-3.6.2/lib/test/unit/error.rb, line 141
def error_occurred?
  not @errors.empty?
end

Private Instance Methods

error_summary() click to toggle source
# File test-unit-3.6.2/lib/test/unit/error.rb, line 153
def error_summary
  "#{error_count} errors"
end
initialize_containers() click to toggle source
Calls superclass method
# File test-unit-3.6.2/lib/test/unit/error.rb, line 146
def initialize_containers
  super
  @errors = []
  @summary_generators << :error_summary
  @problem_checkers << :error_occurred?
end