diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-05 08:48:25 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-05 08:48:25 -0800 |
commit | f6cc4fd7a251490df717a85be3be335a70edaec5 (patch) | |
tree | 7c5ba7332ced3ff0e2f24192f7d8f7b21d75ddbf /actionpack/test/controller | |
parent | 168c088735d47ecb4347541afcbf4a873f50319a (diff) | |
parent | 71d769e3b58cb56b4b1d5143936c65be8b27c490 (diff) | |
download | rails-f6cc4fd7a251490df717a85be3be335a70edaec5.tar.gz rails-f6cc4fd7a251490df717a85be3be335a70edaec5.tar.bz2 rails-f6cc4fd7a251490df717a85be3be335a70edaec5.zip |
Merge pull request #3861 from andyjeffries/master
Named Routes shouldn't override existing ones (currently route recognition goes with the earliest match, named routes use the latest match)
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 4a67380f59..062fc1f94e 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -713,12 +713,12 @@ class RouteSetTest < ActiveSupport::TestCase assert_equal set.routes.first, set.named_routes[:hello] end - def test_later_named_routes_take_precedence + def test_earlier_named_routes_take_precedence set.draw do match '/hello/world' => 'a#b', :as => 'hello' match '/hello' => 'a#b', :as => 'hello' end - assert_equal set.routes.last, set.named_routes[:hello] + assert_equal set.routes.first, set.named_routes[:hello] end def setup_named_route_test |