From 04ef7f4be6c26e35947f2dd3e4dfbd1eb73c9933 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Sun, 30 Apr 2006 21:06:49 +0000 Subject: Small fix in routing to allow dynamic routes (broken after [4242]) [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4319 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/routing_test.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 136a3dc8e6..4f094a36ff 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -823,7 +823,15 @@ class RouteSetTests < Test::Unit::TestCase rs.connect ':controller/:action/:id' end end - + + def test_dynamic_path_allowed + rs.draw do |map| + rs.connect '*path', :controller => 'content', :action => 'show_file' + end + + assert_equal ['/pages/boo', []], rs.generate(:controller => 'content', :action => 'show_file', :path => %w(pages boo)) + end + def test_backwards rs.draw do |map| rs.connect 'page/:id/:action', :controller => 'pages', :action => 'show' -- cgit v1.2.3