aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-06-24 13:23:43 +0200
committerJosé Valim <jose.valim@gmail.com>2010-06-24 13:23:43 +0200
commit6788db824ab732b13493a9d702dd8fb89fa153c8 (patch)
treead9314fdd10b55ebb035959a71be0de921cb0d02 /activerecord/test
parent5441e082f9478ddb3c676c681b09786f1391483c (diff)
downloadrails-6788db824ab732b13493a9d702dd8fb89fa153c8.tar.gz
rails-6788db824ab732b13493a9d702dd8fb89fa153c8.tar.bz2
rails-6788db824ab732b13493a9d702dd8fb89fa153c8.zip
Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved]
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/log_subscriber_test.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/activerecord/test/cases/log_subscriber_test.rb b/activerecord/test/cases/log_subscriber_test.rb
index 1f544b4211..4aeae1fe45 100644
--- a/activerecord/test/cases/log_subscriber_test.rb
+++ b/activerecord/test/cases/log_subscriber_test.rb
@@ -1,20 +1,19 @@
require "cases/helper"
require "models/developer"
-require "rails/log_subscriber/test_helper"
-require "active_record/railties/log_subscriber"
+require "active_support/log_subscriber/test_helper"
class LogSubscriberTest < ActiveSupport::TestCase
- include Rails::LogSubscriber::TestHelper
+ include ActiveSupport::LogSubscriber::TestHelper
def setup
@old_logger = ActiveRecord::Base.logger
super
-
- Rails::LogSubscriber.add(:active_record, ActiveRecord::Railties::LogSubscriber.new)
+ ActiveRecord::LogSubscriber.attach_to(:active_record)
end
def teardown
super
+ ActiveRecord::LogSubscriber.log_subscribers.pop
ActiveRecord::Base.logger = @old_logger
end