diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-04 22:22:21 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-04 23:05:28 +0100 |
commit | 45462c5e41a77e600878f7b8b2e41babeef8fe8f (patch) | |
tree | f8a7e3de9e2a3f3032bbbaa485a4ae73e3a964d4 /activesupport/test | |
parent | 562a00ba16746bf36b7d8b327fabae3dabfdb122 (diff) | |
download | rails-45462c5e41a77e600878f7b8b2e41babeef8fe8f.tar.gz rails-45462c5e41a77e600878f7b8b2e41babeef8fe8f.tar.bz2 rails-45462c5e41a77e600878f7b8b2e41babeef8fe8f.zip |
Expose Instrumenter id in Notifications.
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/notifications_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/notifications_test.rb b/activesupport/test/notifications_test.rb index 3ba77ae135..ef6e6d8d22 100644 --- a/activesupport/test/notifications_test.rb +++ b/activesupport/test/notifications_test.rb @@ -86,6 +86,10 @@ module Notifications assert_equal 2, @notifier.instrument(:awesome) { 1 + 1 } end + def test_instrumenter_exposes_its_id + assert_equal 20, ActiveSupport::Notifications::Instrumenter.new(@notifier).id.size + end + def test_nested_events_can_be_instrumented @notifier.instrument(:awesome, :payload => "notifications") do @notifier.instrument(:wot, :payload => "child") do |