diff options
author | José Valim <jose.valim@gmail.com> | 2010-02-04 10:39:55 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-02-04 10:39:55 +0100 |
commit | 31248fe3698c8d6c54465dfdf463ea49749e1c33 (patch) | |
tree | 7012bd76a668d741689f9f5eee441f109584d590 /activesupport/test | |
parent | efa850558facf2fbaaf226f1444802da83924b82 (diff) | |
download | rails-31248fe3698c8d6c54465dfdf463ea49749e1c33.tar.gz rails-31248fe3698c8d6c54465dfdf463ea49749e1c33.tar.bz2 rails-31248fe3698c8d6c54465dfdf463ea49749e1c33.zip |
Remove instrument! and require thread from AS::Notifications.
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/notifications_test.rb | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/activesupport/test/notifications_test.rb b/activesupport/test/notifications_test.rb index 0b78b53c73..545811a376 100644 --- a/activesupport/test/notifications_test.rb +++ b/activesupport/test/notifications_test.rb @@ -67,29 +67,13 @@ module Notifications end class InstrumentationTest < TestCase - delegate :instrument, :instrument!, :to => ActiveSupport::Notifications + delegate :instrument, :to => ActiveSupport::Notifications def test_instrument_returns_block_result assert_equal 2, instrument(:awesome) { 1 + 1 } drain end - def test_instrument_with_bang_returns_result_even_on_failure - begin - instrument!(:awesome, :payload => "notifications") do - raise "FAIL" - end - flunk - rescue - end - - drain - - assert_equal 1, @events.size - assert_equal :awesome, @events.last.name - assert_equal Hash[:payload => "notifications"], @events.last.payload - end - def test_instrument_yields_the_paylod_for_further_modification assert_equal 2, instrument(:awesome) { |p| p[:result] = 1 + 1 } drain |