diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2011-02-13 23:24:46 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2011-02-13 23:24:46 +0000 |
commit | 385be358cfa80cedff113ba57338e83ca8ac2b52 (patch) | |
tree | 325a1eecce3b934025ed56b5c088165d12dfad62 /actionpack/lib/action_dispatch/testing/assertions/routing.rb | |
parent | 9143032a108bd41121337c82416ba90f460d8214 (diff) | |
download | rails-385be358cfa80cedff113ba57338e83ca8ac2b52.tar.gz rails-385be358cfa80cedff113ba57338e83ca8ac2b52.tar.bz2 rails-385be358cfa80cedff113ba57338e83ca8ac2b52.zip |
Fix assert_recognizes with block constraints [#5805 state:resolved]
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/assertions/routing.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/routing.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/routing.rb b/actionpack/lib/action_dispatch/testing/assertions/routing.rb index 1390b74a95..f440e74691 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/routing.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/routing.rb @@ -124,7 +124,8 @@ module ActionDispatch options[:controller] = "/#{controller}" end - assert_generates(path.is_a?(Hash) ? path[:path] : path, options, defaults, extras, message) + generate_options = options.dup.delete_if{ |k,v| defaults.key?(k) } + assert_generates(path.is_a?(Hash) ? path[:path] : path, generate_options, defaults, extras, message) end # A helper to make it easier to test different route configurations. |