模块 Test::Unit::NotificationHandler
公共类方法
included(base) 点击切换源码
# File test-unit-3.6.7/lib/test/unit/notification.rb, line 94 def included(base) base.exception_handler(:handle_notified_error) end
私有实例方法
handle_notified_error(exception) 点击切换源码
# File test-unit-3.6.7/lib/test/unit/notification.rb, line 100 def handle_notified_error(exception) return false unless exception.is_a?(NotifiedError) notification = Notification.new(name, filter_backtrace(exception.backtrace), exception.message) add_notification(notification) true end