Permalink
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...
1 parent 7d01778 commit 0cfde5f8c063c74e9ad49c2c9eae96256155c3bd @jamis jamis committed Aug 1, 2006
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}")

0 comments on commit 0cfde5f

Please sign in to comment.