Module: Test::Unit::FailureHandler
- Included in:
- TestCase
- Defined in:
- lib/test/unit/failure.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#add_failure(message, backtrace, options = {}) ⇒ void
Report a failure.
Class Method Details
.included(base) ⇒ Object
81 82 83 |
# File 'lib/test/unit/failure.rb', line 81 def included(base) base.exception_handler(:handle_assertion_failed_error) end |
Instance Method Details
#add_failure(message, backtrace, options = {}) ⇒ void
This method returns an undefined value.
Report a failure.
This is a public API for developers who extend test-unit.
112 113 114 115 116 117 118 119 120 |
# File 'lib/test/unit/failure.rb', line 112 def add_failure(, backtrace, ={}) = { :method_name => @method_name, :source_location => self[:source_location], } failure = Failure.new(name, filter_backtrace(backtrace), , .merge()) current_result.add_failure(failure) end |