module Test::Unit::TestCaseNotificationSupport
def notify(message, options={}, &block)
options:
end
# Reached here too
notify("Special!") if special_case?
# Reached here
notify("I'm here!")
def test_notification
Example:
Notify some information.
def notify(message, options={}, &block) backtrace = filter_backtrace(options[:backtrace] || caller) notification = Notification.new(name, backtrace, message, :method_name => @method_name) add_notification(notification) end