aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/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 /actionpack/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 'actionpack/test')
-rw-r--r--actionpack/test/activerecord/controller_runtime_test.rb10
-rw-r--r--actionpack/test/controller/log_subscriber_test.rb10
-rw-r--r--actionpack/test/template/log_subscriber_test.rb10
3 files changed, 15 insertions, 15 deletions
diff --git a/actionpack/test/activerecord/controller_runtime_test.rb b/actionpack/test/activerecord/controller_runtime_test.rb
index 331f861d8f..cfd86d704d 100644
--- a/actionpack/test/activerecord/controller_runtime_test.rb
+++ b/actionpack/test/activerecord/controller_runtime_test.rb
@@ -1,8 +1,8 @@
require 'active_record_unit'
require 'active_record/railties/controller_runtime'
require 'fixtures/project'
-require 'rails/log_subscriber/test_helper'
-require 'action_controller/railties/log_subscriber'
+require 'active_support/log_subscriber/test_helper'
+require 'action_controller/log_subscriber'
ActionController::Base.send :include, ActiveRecord::Railties::ControllerRuntime
@@ -13,18 +13,18 @@ class ControllerRuntimeLogSubscriberTest < ActionController::TestCase
end
end
- include Rails::LogSubscriber::TestHelper
+ include ActiveSupport::LogSubscriber::TestHelper
tests LogSubscriberController
def setup
super
@old_logger = ActionController::Base.logger
- Rails::LogSubscriber.add(:action_controller, ActionController::Railties::LogSubscriber.new)
+ ActionController::LogSubscriber.attach_to :action_controller
end
def teardown
super
- Rails::LogSubscriber.log_subscribers.clear
+ ActiveSupport::LogSubscriber.log_subscribers.clear
ActionController::Base.logger = @old_logger
end
diff --git a/actionpack/test/controller/log_subscriber_test.rb b/actionpack/test/controller/log_subscriber_test.rb
index b11eba2f89..0a18741f0c 100644
--- a/actionpack/test/controller/log_subscriber_test.rb
+++ b/actionpack/test/controller/log_subscriber_test.rb
@@ -1,6 +1,6 @@
require "abstract_unit"
-require "rails/log_subscriber/test_helper"
-require "action_controller/railties/log_subscriber"
+require "active_support/log_subscriber/test_helper"
+require "action_controller/log_subscriber"
module Another
class LogSubscribersController < ActionController::Base
@@ -37,7 +37,7 @@ end
class ACLogSubscriberTest < ActionController::TestCase
tests Another::LogSubscribersController
- include Rails::LogSubscriber::TestHelper
+ include ActiveSupport::LogSubscriber::TestHelper
def setup
super
@@ -47,12 +47,12 @@ class ACLogSubscriberTest < ActionController::TestCase
@cache_path = File.expand_path('../temp/test_cache', File.dirname(__FILE__))
ActionController::Base.page_cache_directory = @cache_path
@controller.cache_store = :file_store, @cache_path
- Rails::LogSubscriber.add(:action_controller, ActionController::Railties::LogSubscriber.new)
+ ActionController::LogSubscriber.attach_to :action_controller
end
def teardown
super
- Rails::LogSubscriber.log_subscribers.clear
+ ActiveSupport::LogSubscriber.log_subscribers.clear
FileUtils.rm_rf(@cache_path)
ActionController::Base.logger = @old_logger
end
diff --git a/actionpack/test/template/log_subscriber_test.rb b/actionpack/test/template/log_subscriber_test.rb
index 5076dfa70f..eb1e548672 100644
--- a/actionpack/test/template/log_subscriber_test.rb
+++ b/actionpack/test/template/log_subscriber_test.rb
@@ -1,22 +1,22 @@
require "abstract_unit"
-require "rails/log_subscriber/test_helper"
-require "action_view/railties/log_subscriber"
+require "active_support/log_subscriber/test_helper"
+require "action_view/log_subscriber"
require "controller/fake_models"
class AVLogSubscriberTest < ActiveSupport::TestCase
- include Rails::LogSubscriber::TestHelper
+ include ActiveSupport::LogSubscriber::TestHelper
def setup
super
@old_logger = ActionController::Base.logger
@view = ActionView::Base.new(ActionController::Base.view_paths, {})
Rails.stubs(:root).returns(File.expand_path(FIXTURE_LOAD_PATH))
- Rails::LogSubscriber.add(:action_view, ActionView::Railties::LogSubscriber.new)
+ ActionView::LogSubscriber.attach_to :action_view
end
def teardown
super
- Rails::LogSubscriber.log_subscribers.clear
+ ActiveSupport::LogSubscriber.log_subscribers.clear
ActionController::Base.logger = @old_logger
end