From 72a574b5073b1debd58c954b34c54d3bdee7749f Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Fri, 22 May 2009 15:16:28 -0700 Subject: Get controller/layout_test.rb running on new base except for ActionController::Base.exempt_from_layout which is going to be deprecated. --- actionpack/test/controller/layout_test.rb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/layout_test.rb b/actionpack/test/controller/layout_test.rb index 1cd448d5e8..04da0a7f86 100644 --- a/actionpack/test/controller/layout_test.rb +++ b/actionpack/test/controller/layout_test.rb @@ -174,15 +174,18 @@ class LayoutSetInResponseTest < ActionController::TestCase assert_nil @controller.template.layout end - def test_exempt_from_layout_honored_by_render_template - ActionController::Base.exempt_from_layout :erb - @controller = RenderWithTemplateOptionController.new + for_tag(:old_base) do + # exempt_from_layout is deprecated + def test_exempt_from_layout_honored_by_render_template + ActionController::Base.exempt_from_layout :erb + @controller = RenderWithTemplateOptionController.new - get :hello - assert_equal "alt/hello.rhtml", @response.body.strip + get :hello + assert_equal "alt/hello.rhtml", @response.body.strip - ensure - ActionController::Base.exempt_from_layout.delete(ERB) + ensure + ActionController::Base.exempt_from_layout.delete(ERB) + end end def test_layout_is_picked_from_the_controller_instances_view_path -- cgit v1.2.3