module Test::Unit::OmissionHandler

Public Class Methods

included(base) click to toggle source
# File lib/test/unit/omission.rb, line 150
def included(base)
  base.exception_handler(:handle_omitted_error)
end

Private Instance Methods

handle_omitted_error(exception) click to toggle source
# File lib/test/unit/omission.rb, line 156
def handle_omitted_error(exception)
  return false unless exception.is_a?(OmittedError)
  omission = Omission.new(name,
                          filter_backtrace(exception.backtrace),
                          exception.message,
                          :method_name => @method_name)
  add_omission(omission)
  true
end