diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-22 15:16:28 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-22 15:25:13 -0700 |
commit | 72a574b5073b1debd58c954b34c54d3bdee7749f (patch) | |
tree | 994345ceb428e29ba7588ee5abc5cf2fa73de448 /actionpack/test | |
parent | 01129534cde293e3561dd7cc3cb5ae9ac3de9e8c (diff) | |
download | rails-72a574b5073b1debd58c954b34c54d3bdee7749f.tar.gz rails-72a574b5073b1debd58c954b34c54d3bdee7749f.tar.bz2 rails-72a574b5073b1debd58c954b34c54d3bdee7749f.zip |
Get controller/layout_test.rb running on new base except for ActionController::Base.exempt_from_layout which is going to be deprecated.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/layout_test.rb | 17 |
1 files changed, 10 insertions, 7 deletions
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 |