aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-01-03 13:56:12 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-01-03 13:56:12 -0800
commite9122112facf56131d4bf0739382d9235582f8c0 (patch)
tree61e46b5bdd495cab412371ce7734cfb7f9e2bab3 /actionpack/test/controller
parentc4a29de0e0706c7a8e7641f099eedaaf60c185ec (diff)
downloadrails-e9122112facf56131d4bf0739382d9235582f8c0.tar.gz
rails-e9122112facf56131d4bf0739382d9235582f8c0.tar.bz2
rails-e9122112facf56131d4bf0739382d9235582f8c0.zip
Revert "Named Routes shouldn't override existing ones (currently route recognition goes with the earliest match, named routes use the latest match)"
This reverts commit 71d769e3b58cb56b4b1d5143936c65be8b27c490.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/routing_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 53a50898c5..8cefa16ad7 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -789,12 +789,12 @@ class RouteSetTest < ActiveSupport::TestCase
assert_equal set.routes.first, set.named_routes[:hello]
end
- def test_earlier_named_routes_take_precedence
+ def test_later_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.first, set.named_routes[:hello]
+ assert_equal set.routes.last, set.named_routes[:hello]
end
def setup_named_route_test