aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/notifications_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/notifications_test.rb')
-rw-r--r--activesupport/test/notifications_test.rb18
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