1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Jeremy Kemper 2007-01-12 10:31:24 +00:00
parent c302cdfcc4
commit 88e02f6e56

View file

@ -75,6 +75,8 @@ end
class ExemptFromLayoutTest < Test::Unit::TestCase class ExemptFromLayoutTest < Test::Unit::TestCase
def setup def setup
@controller = LayoutTest.new @controller = LayoutTest.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end end
def test_rjs_exempt_from_layout def test_rjs_exempt_from_layout
@ -103,6 +105,16 @@ class ExemptFromLayoutTest < Test::Unit::TestCase
ActionController::Base.exempt_from_layout /\.rdoc/ ActionController::Base.exempt_from_layout /\.rdoc/
assert @controller.send(:template_exempt_from_layout?, 'test.rdoc') assert @controller.send(:template_exempt_from_layout?, 'test.rdoc')
end 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 end