Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make sure assert_respond_to works with symbol parameters

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4648 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 0cfde5f8c063c74e9ad49c2c9eae96256155c3bd 1 parent 7d01778
@jamis jamis authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_controller/assertions.rb
View
2  actionpack/lib/action_controller/assertions.rb
@@ -78,7 +78,7 @@ def assert_redirected_to(options = {}, message=nil)
begin
url = {}
- original = { :expected => options, :actual => @response.redirected_to.dup }
+ original = { :expected => options, :actual => @response.redirected_to.is_a?(Symbol) ? @response.redirected_to : @response.redirected_to.dup }
original.each do |key, value|
if value.is_a?(Symbol)
value = @controller.respond_to?(value, true) ? @controller.send(value) : @controller.send("hash_for_#{option}")
Please sign in to comment.
Something went wrong with that request. Please try again.