Skip to content

Commit

Permalink
deprecated render assertions
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4977 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jeremy committed Sep 4, 2006
1 parent e04a6e8 commit da8d7a7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions actionpack/test/controller/render_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def test_simple_show
end

def test_do_with_render
get :render_hello_world
assert_deprecated_render { get :render_hello_world }
assert_template "test/hello_world"
end

Expand Down Expand Up @@ -184,7 +184,7 @@ def test_access_to_request_in_view
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

Expand Down Expand Up @@ -243,4 +243,9 @@ def test_accessing_local_assigns_in_inline_template_with_string_keys
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

0 comments on commit da8d7a7

Please sign in to comment.