aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/log_subscriber_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-05-01 11:53:09 +0200
committerJosé Valim <jose.valim@gmail.com>2011-05-01 13:40:12 +0200
commit2f683fd870d0e4c5aff38510ef03c7e5144a1ea4 (patch)
treeeba0e7816c0460907bf3df6202c6056e84ccd430 /actionpack/test/template/log_subscriber_test.rb
parentbebaccdf4a3a17f2ead349cca891032e245655ff (diff)
downloadrails-2f683fd870d0e4c5aff38510ef03c7e5144a1ea4.tar.gz
rails-2f683fd870d0e4c5aff38510ef03c7e5144a1ea4.tar.bz2
rails-2f683fd870d0e4c5aff38510ef03c7e5144a1ea4.zip
Remove more dependencies from the view.
Diffstat (limited to 'actionpack/test/template/log_subscriber_test.rb')
-rw-r--r--actionpack/test/template/log_subscriber_test.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/actionpack/test/template/log_subscriber_test.rb b/actionpack/test/template/log_subscriber_test.rb
index 8b8b005a1d..50e1cccd3b 100644
--- a/actionpack/test/template/log_subscriber_test.rb
+++ b/actionpack/test/template/log_subscriber_test.rb
@@ -9,7 +9,9 @@ class AVLogSubscriberTest < ActiveSupport::TestCase
def setup
super
@old_logger = ActionController::Base.logger
- @view = ActionView::Base.new(ActionController::Base.view_paths, {})
+ @controller = Object.new
+ @controller.stubs(:_prefixes).returns(%w(test))
+ @view = ActionView::Base.new(ActionController::Base.view_paths, {}, @controller)
Rails.stubs(:root).returns(File.expand_path(FIXTURE_LOAD_PATH))
ActionView::LogSubscriber.attach_to :action_view
end
@@ -57,7 +59,6 @@ class AVLogSubscriberTest < ActiveSupport::TestCase
end
def test_render_partial_with_implicit_path
- @view.stubs(:controller_prefixes).returns(%w(test))
@view.render(Customer.new("david"), :greeting => "hi")
wait
@@ -74,7 +75,6 @@ class AVLogSubscriberTest < ActiveSupport::TestCase
end
def test_render_collection_with_implicit_path
- @view.stubs(:controller_prefixes).returns(%w(test))
@view.render([ Customer.new("david"), Customer.new("mary") ], :greeting => "hi")
wait
@@ -83,7 +83,6 @@ class AVLogSubscriberTest < ActiveSupport::TestCase
end
def test_render_collection_template_without_path
- @view.stubs(:controller_prefixes).returns(%w(test))
@view.render([ GoodCustomer.new("david"), Customer.new("mary") ], :greeting => "hi")
wait