Module Test::Unit::ExceptionHandler::ClassMethods
In: lib/test/unit/exception-handler.rb

Methods

Public Instance methods

@overload exception_handler(method_name)

  Add an exception handler method.

  @param method_name [Symbol]
     The method name that handles exception raised in tests.
  @return [void]

@overload exception_handler(&callback)

  Add an exception handler.

  @yield [test, exception]
    Gives the test and the exception.
  @yieldparam test [Test::Unit::TestCase]
     The test where the exception is raised.
  @yieldparam exception [Exception]
     The exception that is raised in running the test.
  @yieldreturn [Boolean]
     Whether the handler handles the exception or not.
     The handler must return _true_ if the handler handles
     test exception, _false_ otherwise.
  @return [void]

This is a public API for developers who extend test-unit.

[Validate]