Permalink
Browse files

Fix validate_request method name

  • Loading branch information...
josh committed Apr 28, 2009
1 parent acd5db3 commit afa7d7ff05a0d4787b216d50d609084649f21669
Showing with 4 additions and 4 deletions.
  1. +4 −4 actionpack/lib/action_controller/testing/assertions/response.rb
@@ -22,7 +22,7 @@ module ResponseAssertions
# assert_response 401
#
def assert_response(type, message = nil)
- validate_response!
+ validate_request!
clean_backtrace do
if [ :success, :missing, :redirect, :error ].include?(type) && @response.send("#{type}?")
@@ -59,7 +59,7 @@ def assert_response(type, message = nil)
# assert_redirected_to @customer
#
def assert_redirected_to(options = {}, message=nil)
- validate_response!
+ validate_request!
clean_backtrace do
assert_response(:redirect, message)
@@ -93,7 +93,7 @@ def assert_redirected_to(options = {}, message=nil)
# assert_template :partial => false
#
def assert_template(options = {}, message = nil)
- validate_response!
+ validate_request!
clean_backtrace do
case options
@@ -152,7 +152,7 @@ def normalize_argument_to_redirection(fragment)
end
end
- def validate_response!
+ def validate_request!
unless @request.is_a?(ActionDispatch::Request)
raise ArgumentError, "@request must be an ActionDispatch::Request"
end

0 comments on commit afa7d7f

Please sign in to comment.