diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-02-07 13:45:43 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-02-07 14:35:11 -0800 |
commit | 60da34b4be009da5da460c59d10c500a76170ed5 (patch) | |
tree | 6f755aca515d84f7448ae4891f2f5fa0e6a1a8fd /activesupport/lib/active_support/log_subscriber/test_helper.rb | |
parent | 933adce8f45b41a5a6b6bb31ba9d6fb5188f4a35 (diff) | |
download | rails-60da34b4be009da5da460c59d10c500a76170ed5.tar.gz rails-60da34b4be009da5da460c59d10c500a76170ed5.tar.bz2 rails-60da34b4be009da5da460c59d10c500a76170ed5.zip |
notifier should be saved and re-set, not deleted
Diffstat (limited to 'activesupport/lib/active_support/log_subscriber/test_helper.rb')
-rw-r--r-- | activesupport/lib/active_support/log_subscriber/test_helper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/log_subscriber/test_helper.rb b/activesupport/lib/active_support/log_subscriber/test_helper.rb index 5c24b9c759..52a64383a2 100644 --- a/activesupport/lib/active_support/log_subscriber/test_helper.rb +++ b/activesupport/lib/active_support/log_subscriber/test_helper.rb @@ -38,13 +38,14 @@ module ActiveSupport ActiveSupport::LogSubscriber.colorize_logging = false + @old_notifier = ActiveSupport::Notifications.notifier set_logger(@logger) ActiveSupport::Notifications.notifier = @notifier end def teardown set_logger(nil) - ActiveSupport::Notifications.notifier = nil + ActiveSupport::Notifications.notifier = @old_notifier end class MockLogger |