diff options
Diffstat (limited to 'actionpack/test/controller/layout_test.rb')
-rw-r--r-- | actionpack/test/controller/layout_test.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/actionpack/test/controller/layout_test.rb b/actionpack/test/controller/layout_test.rb index 11559b4071..da3f7b0cb8 100644 --- a/actionpack/test/controller/layout_test.rb +++ b/actionpack/test/controller/layout_test.rb @@ -57,7 +57,7 @@ class LayoutAutoDiscoveryTest < ActionController::TestCase @controller = ThirdPartyTemplateLibraryController.new get :hello assert @controller.active_layout(true).identifier.include?('layouts/third_party_template_library.mab') - assert @response.layout.include?('layouts/third_party_template_library') + assert @controller.template.layout.include?('layouts/third_party_template_library') assert_response :success assert_equal 'Mab', @response.body end @@ -121,49 +121,49 @@ class LayoutSetInResponseTest < ActionController::TestCase def test_layout_set_when_using_default_layout @controller = DefaultLayoutController.new get :hello - assert @response.layout.include?('layouts/layout_test') + assert @controller.template.layout.include?('layouts/layout_test') end def test_layout_set_when_set_in_controller @controller = HasOwnLayoutController.new get :hello - assert @response.layout.include?('layouts/item') + assert @controller.template.layout.include?('layouts/item') end def test_layout_only_exception_when_included @controller = OnlyLayoutController.new get :hello - assert @response.layout.include?('layouts/item') + assert @controller.template.layout.include?('layouts/item') end def test_layout_only_exception_when_excepted @controller = OnlyLayoutController.new get :goodbye - assert_equal nil, @response.layout + assert_equal nil, @controller.template.layout end def test_layout_except_exception_when_included @controller = ExceptLayoutController.new get :hello - assert @response.layout.include?('layouts/item') + assert @controller.template.layout.include?('layouts/item') end def test_layout_except_exception_when_excepted @controller = ExceptLayoutController.new get :goodbye - assert_equal nil, @response.layout + assert_equal nil, @controller.template.layout end def test_layout_set_when_using_render @controller = SetsLayoutInRenderController.new get :hello - assert @response.layout.include?('layouts/third_party_template_library') + assert @controller.template.layout.include?('layouts/third_party_template_library') end def test_layout_is_not_set_when_none_rendered @controller = RendersNoLayoutController.new get :hello - assert_nil @response.layout + assert_nil @controller.template.layout end def test_exempt_from_layout_honored_by_render_template @@ -181,7 +181,7 @@ class LayoutSetInResponseTest < ActionController::TestCase pending do @controller = PrependsViewPathController.new get :hello - assert_equal 'layouts/alt', @response.layout + assert_equal 'layouts/alt', @controller.template.layout end end @@ -206,7 +206,7 @@ class LayoutExceptionRaised < ActionController::TestCase def test_exception_raised_when_layout_file_not_found @controller = SetsNonExistentLayoutFile.new get :hello - assert_kind_of ActionView::MissingTemplate, @response.template.instance_eval { @exception } + assert_kind_of ActionView::MissingTemplate, @controller.template.instance_eval { @exception } end end @@ -234,7 +234,7 @@ unless RUBY_PLATFORM =~ /(:?mswin|mingw|bccwin)/ @controller = LayoutSymlinkedTest.new get :hello assert_response 200 - assert @response.layout.include?("layouts/symlinked/symlinked_layout") + assert @controller.template.layout.include?("layouts/symlinked/symlinked_layout") end end end |