diff options
Diffstat (limited to 'activesupport/test/notifications_test.rb')
-rw-r--r-- | activesupport/test/notifications_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activesupport/test/notifications_test.rb b/activesupport/test/notifications_test.rb index c2e1c588f0..e11de5f67a 100644 --- a/activesupport/test/notifications_test.rb +++ b/activesupport/test/notifications_test.rb @@ -168,7 +168,7 @@ module Notifications assert_equal Hash[:payload => "notifications"], @events.last.payload end - def test_instrument_does_not_publish_when_exception_is_raised + def test_instrument_publishes_when_exception_is_raised begin instrument(:awesome, :payload => "notifications") do raise "FAIL" @@ -178,7 +178,9 @@ module Notifications end drain - assert_equal 0, @events.size + assert_equal 1, @events.size + assert_equal Hash[:payload => "notifications", + :exception => ["RuntimeError", "FAIL"]], @events.last.payload end def test_event_is_pushed_even_without_block |