Module: Test::Unit::TestResultErrorSupport

Included in:
TestResult
Defined in:
lib/test/unit/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



92
93
94
# File 'lib/test/unit/error.rb', line 92

def errors
  @errors
end

Instance Method Details

#add_error(error) ⇒ Object

Records a Test::Unit::Error.



95
96
97
98
99
# File 'lib/test/unit/error.rb', line 95

def add_error(error)
  @errors << error
  notify_fault(error)
  notify_changed
end

#error_countObject

Returns the number of errors this TestResult has recorded.



103
104
105
# File 'lib/test/unit/error.rb', line 103

def error_count
  @errors.size
end

#error_occurred?Boolean

Returns:

  • (Boolean)


107
108
109
# File 'lib/test/unit/error.rb', line 107

def error_occurred?
  not @errors.empty?
end