Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Failing test for exempt_from_layout :rhtml. References #6742.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5909 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 88e02f6e56a4c3cb521936c41b1bb1129b9147d3 1 parent c302cdf
@jeremy jeremy authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 actionpack/test/controller/layout_test.rb
View
12 actionpack/test/controller/layout_test.rb
@@ -75,6 +75,8 @@ def test_namespaced_controllers_auto_detect_layouts
class ExemptFromLayoutTest < Test::Unit::TestCase
def setup
@controller = LayoutTest.new
+ @request = ActionController::TestRequest.new
+ @response = ActionController::TestResponse.new
end
def test_rjs_exempt_from_layout
@@ -103,6 +105,16 @@ def test_add_regexp_to_exempt_from_layout
ActionController::Base.exempt_from_layout /\.rdoc/
assert @controller.send(:template_exempt_from_layout?, 'test.rdoc')
end
+
+ # TODO: http://dev.rubyonrails.org/ticket/6742
+ # The rhtml exemption is ignored.
+ def test_rhtml_exempt_from_layout_status_should_prevent_layout_render
+ ActionController::Base.exempt_from_layout :rhtml
+ assert @controller.send(:template_exempt_from_layout?, 'test.rhtml')
+
+ get :hello
+ assert_equal 'hello.rhtml', @response.body
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.