Module: Test::Unit::ErrorHandler

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

Constant Summary collapse

NOT_PASS_THROUGH_EXCEPTIONS =
[].freeze
NOT_PASS_THROUGH_EXCEPTION_NAMES =
["Timeout::Error"].freeze
PASS_THROUGH_EXCEPTIONS =
[
  NoMemoryError,
  SignalException,
  Interrupt,
  SystemExit,
].freeze
PASS_THROUGH_EXCEPTION_NAMES =
[].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



75
76
77
# File 'lib/test/unit/error.rb', line 75

def included(base)
  base.exception_handler(:handle_all_exception)
end

Instance Method Details

#error? ⇒ Boolean

Returns whether an error occurred in the test. This is for Minitest compatibility.

Returns:

  • (Boolean)


94
95
96
# File 'lib/test/unit/error.rb', line 94

def error?
  @internal_data.errored?
end