模块 Test::Unit::ExceptionHandler
公共类方法
exception_handlers() 点击切换源代码
# File test-unit-3.6.7/lib/test/unit/exception-handler.rb, line 6 def exception_handlers @@exception_handlers end
included(base) 点击切换源代码
# File test-unit-3.6.7/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