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

- (Object) errors (readonly)

Returns the value of attribute errors



122
123
124
# File 'lib/test/unit/error.rb', line 122

def errors
  @errors
end

Instance Method Details

- (Object) add_error(error)

Records a Test::Unit::Error.



125
126
127
128
129
# File 'lib/test/unit/error.rb', line 125

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

- (Object) error_count

Returns the number of errors this TestResult has recorded.



133
134
135
# File 'lib/test/unit/error.rb', line 133

def error_count
  @errors.size
end

- (Boolean) error_occurred?



137
138
139
# File 'lib/test/unit/error.rb', line 137

def error_occurred?
  not @errors.empty?
end