diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-01 11:53:09 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-01 13:40:12 +0200 |
commit | 2f683fd870d0e4c5aff38510ef03c7e5144a1ea4 (patch) | |
tree | eba0e7816c0460907bf3df6202c6056e84ccd430 /actionpack/test | |
parent | bebaccdf4a3a17f2ead349cca891032e245655ff (diff) | |
download | rails-2f683fd870d0e4c5aff38510ef03c7e5144a1ea4.tar.gz rails-2f683fd870d0e4c5aff38510ef03c7e5144a1ea4.tar.bz2 rails-2f683fd870d0e4c5aff38510ef03c7e5144a1ea4.zip |
Remove more dependencies from the view.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/log_subscriber_test.rb | 7 |
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 |