Module: Test::Unit::ExceptionHandler
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/test/unit/exception-handler.rb |
Class Method Summary
Class Method Details
.exception_handlers
[ GitHub ]# File 'lib/test/unit/exception-handler.rb', line 6
def exception_handlers @@exception_handlers end
.included(base)
[ GitHub ]# 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