From b88fa4d1df7763245a14f9d81a4206273acd2d7e Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 21 Mar 2005 00:40:51 +0000 Subject: Routes: *path items should use arrays #883 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@954 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/routing_tests.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'actionpack/test/controller/routing_tests.rb') diff --git a/actionpack/test/controller/routing_tests.rb b/actionpack/test/controller/routing_tests.rb index f36e395107..a5b6066d66 100644 --- a/actionpack/test/controller/routing_tests.rb +++ b/actionpack/test/controller/routing_tests.rb @@ -329,11 +329,21 @@ class RouteTests < Test::Unit::TestCase def test_path_collection route '*path_info', :controller => 'content', :action => 'fish' verify_recognize'path/with/slashes', - :controller => 'content', :action => 'fish', :path_info => 'path/with/slashes' + :controller => 'content', :action => 'fish', :path_info => %w(path with slashes) verify_generate('path/with/slashes', {}, - {:controller => 'content', :action => 'fish', :path_info => 'path/with/slashes'}, + {:controller => 'content', :action => 'fish', :path_info => 'path/with/slashes'}, {}) end + def test_path_collection_with_array + route '*path_info', :controller => 'content', :action => 'fish' + verify_recognize'path/with/slashes', + :controller => 'content', :action => 'fish', :path_info => %w(path with slashes) + verify_generate('path/with/slashes', {}, + {:controller => 'content', :action => 'fish', :path_info => %w(path with slashes)}, + {}) + end + + def test_special_characters route ':id', :controller => 'content', :action => 'fish' -- cgit v1.2.3