From 31248fe3698c8d6c54465dfdf463ea49749e1c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 4 Feb 2010 10:39:55 +0100 Subject: Remove instrument! and require thread from AS::Notifications. --- activesupport/test/notifications_test.rb | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'activesupport/test') 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 -- cgit v1.2.3