Module: Test::Unit::FailureHandler
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/test/unit/failure.rb |
Class Method Summary
Instance Method Summary
-
#add_failure(message, backtrace, options = {}) ⇒ void
Report a failure.
- #handle_assertion_failed_error(exception) private
Class Method Details
.included(base)
[ GitHub ]# 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.
#handle_assertion_failed_error(exception) (private)
[ GitHub ]# File 'lib/test/unit/failure.rb', line 123
def handle_assertion_failed_error(exception) return false unless exception.is_a?(AssertionFailedError) problem_occurred add_failure(exception., exception.backtrace, :expected => exception.expected, :actual => exception.actual, :inspected_expected => exception.inspected_expected, :inspected_actual => exception.inspected_actual, : => exception. ) true end