aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2010-02-15 21:44:30 +0700
committerJosé Valim <jose.valim@gmail.com>2010-02-16 22:36:15 +0100
commitf0523f72b46db14e2f50c8347a8708734c650f84 (patch)
treecf6562eb8f6c2e302a33840f36f04d838aadb569 /actionpack/test
parent7cff54f5d3ae2e364f0d147ceb86ea701b21389c (diff)
downloadrails-f0523f72b46db14e2f50c8347a8708734c650f84.tar.gz
rails-f0523f72b46db14e2f50c8347a8708734c650f84.tar.bz2
rails-f0523f72b46db14e2f50c8347a8708734c650f84.zip
Rename Rails::Subscriber to Rails::LogSubscriber
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/activerecord/controller_runtime_test.rb16
-rw-r--r--actionpack/test/controller/log_subscriber_test.rb (renamed from actionpack/test/controller/subscriber_test.rb)18
-rw-r--r--actionpack/test/template/log_subscriber_test.rb (renamed from actionpack/test/template/subscriber_test.rb)12
3 files changed, 23 insertions, 23 deletions
diff --git a/actionpack/test/activerecord/controller_runtime_test.rb b/actionpack/test/activerecord/controller_runtime_test.rb
index ed8e324938..4d2a7b9b5a 100644
--- a/actionpack/test/activerecord/controller_runtime_test.rb
+++ b/actionpack/test/activerecord/controller_runtime_test.rb
@@ -1,30 +1,30 @@
require 'active_record_unit'
require 'active_record/railties/controller_runtime'
require 'fixtures/project'
-require 'rails/subscriber/test_helper'
-require 'action_controller/railties/subscriber'
+require 'rails/log_subscriber/test_helper'
+require 'action_controller/railties/log_subscriber'
ActionController::Base.send :include, ActiveRecord::Railties::ControllerRuntime
-class ControllerRuntimeSubscriberTest < ActionController::TestCase
- class SubscriberController < ActionController::Base
+class ControllerRuntimeLogSubscriberTest < ActionController::TestCase
+ class LogSubscriberController < ActionController::Base
def show
render :inline => "<%= Project.all %>"
end
end
- include Rails::Subscriber::TestHelper
- tests SubscriberController
+ include Rails::LogSubscriber::TestHelper
+ tests LogSubscriberController
def setup
@old_logger = ActionController::Base.logger
- Rails::Subscriber.add(:action_controller, ActionController::Railties::Subscriber.new)
+ Rails::LogSubscriber.add(:action_controller, ActionController::Railties::LogSubscriber.new)
super
end
def teardown
super
- Rails::Subscriber.subscribers.clear
+ Rails::LogSubscriber.log_subscribers.clear
ActionController::Base.logger = @old_logger
end
diff --git a/actionpack/test/controller/subscriber_test.rb b/actionpack/test/controller/log_subscriber_test.rb
index d7c1166f14..182f343b2f 100644
--- a/actionpack/test/controller/subscriber_test.rb
+++ b/actionpack/test/controller/log_subscriber_test.rb
@@ -1,9 +1,9 @@
require "abstract_unit"
-require "rails/subscriber/test_helper"
-require "action_controller/railties/subscriber"
+require "rails/log_subscriber/test_helper"
+require "action_controller/railties/log_subscriber"
module Another
- class SubscribersController < ActionController::Base
+ class LogSubscribersController < ActionController::Base
def show
render :nothing => true
end
@@ -35,9 +35,9 @@ module Another
end
end
-class ACSubscriberTest < ActionController::TestCase
- tests Another::SubscribersController
- include Rails::Subscriber::TestHelper
+class ACLogSubscriberTest < ActionController::TestCase
+ tests Another::LogSubscribersController
+ include Rails::LogSubscriber::TestHelper
def setup
@old_logger = ActionController::Base.logger
@@ -46,13 +46,13 @@ class ACSubscriberTest < ActionController::TestCase
ActionController::Base.page_cache_directory = @cache_path
ActionController::Base.cache_store = :file_store, @cache_path
- Rails::Subscriber.add(:action_controller, ActionController::Railties::Subscriber.new)
+ Rails::LogSubscriber.add(:action_controller, ActionController::Railties::LogSubscriber.new)
super
end
def teardown
super
- Rails::Subscriber.subscribers.clear
+ Rails::LogSubscriber.log_subscribers.clear
FileUtils.rm_rf(@cache_path)
ActionController::Base.logger = @old_logger
end
@@ -65,7 +65,7 @@ class ACSubscriberTest < ActionController::TestCase
get :show
wait
assert_equal 2, logs.size
- assert_equal "Processing by Another::SubscribersController#show as HTML", logs.first
+ assert_equal "Processing by Another::LogSubscribersController#show as HTML", logs.first
end
def test_process_action
diff --git a/actionpack/test/template/subscriber_test.rb b/actionpack/test/template/log_subscriber_test.rb
index 8bacab7088..2eb2484cf5 100644
--- a/actionpack/test/template/subscriber_test.rb
+++ b/actionpack/test/template/log_subscriber_test.rb
@@ -1,22 +1,22 @@
require "abstract_unit"
-require "rails/subscriber/test_helper"
-require "action_view/railties/subscriber"
+require "rails/log_subscriber/test_helper"
+require "action_view/railties/log_subscriber"
require "controller/fake_models"
-class AVSubscriberTest < ActiveSupport::TestCase
- include Rails::Subscriber::TestHelper
+class AVLogSubscriberTest < ActiveSupport::TestCase
+ include Rails::LogSubscriber::TestHelper
def setup
@old_logger = ActionController::Base.logger
@view = ActionView::Base.new(ActionController::Base.view_paths, {})
Rails.stubs(:root).returns(File.expand_path(FIXTURE_LOAD_PATH))
- Rails::Subscriber.add(:action_view, ActionView::Railties::Subscriber.new)
+ Rails::LogSubscriber.add(:action_view, ActionView::Railties::LogSubscriber.new)
super
end
def teardown
super
- Rails::Subscriber.subscribers.clear
+ Rails::LogSubscriber.log_subscribers.clear
ActionController::Base.logger = @old_logger
end