module Test::Unit::ExceptionHandler
Public Class Methods
exception_handlers()
click to toggle source
# File lib/test/unit/exception-handler.rb, line 6 def exception_handlers @@exception_handlers end
included(base)
click to toggle source
# File lib/test/unit/exception-handler.rb, line 10 def included(base) base.extend(ClassMethods) observer = Proc.new do |test_case, _, _, value, method_name| if value @@exception_handlers.unshift(method_name) else @@exception_handlers.delete(method_name) end end base.register_attribute_observer(:exception_handler, &observer) end