deprecated render assertions

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4977 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2006-09-04 05:51:48 +00:00
parent e04a6e8155
commit da8d7a7011
1 changed files with 7 additions and 2 deletions

View File

@ -127,7 +127,7 @@ class RenderTest < Test::Unit::TestCase
end
def test_do_with_render
get :render_hello_world
assert_deprecated_render { get :render_hello_world }
assert_template "test/hello_world"
end
@ -184,7 +184,7 @@ class RenderTest < Test::Unit::TestCase
end
def test_render_xml
get :render_xml_hello
assert_deprecated_render { get :render_xml_hello }
assert_equal "<html>\n <p>Hello David</p>\n<p>This is grand!</p>\n</html>\n", @response.body
end
@ -243,4 +243,9 @@ class RenderTest < Test::Unit::TestCase
get :accessing_local_assigns_in_inline_template_with_string_keys, :local_name => "Local David"
assert_equal "Goodbye, Local David", @response.body
end
protected
def assert_deprecated_render(&block)
assert_deprecated(/render/, &block)
end
end