diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 5f75bf3876..f9e4de7dfb 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -310,9 +310,12 @@ class LegacyRouteSetTests < Test::Unit::TestCase rs.draw do |map| map.content '/content/:query', :controller => 'content', :action => 'show' end + exception = assert_raise(ActionController::RoutingError) { rs.generate(:controller => 'content', :action => 'show', :use_route => "content") } - expected_message = %[content_url failed to generate from {:action=>"show", :controller=>"content"} - you may have ambiguous routes, or you may need to supply additional parameters for this route. content_url has the following required parameters: ["content", :query] - are they all satisifed?] - assert_equal expected_message, exception.message + assert_match %r[:action=>"show"], exception.message + assert_match %r[:controller=>"content"], exception.message + assert_match %r[you may have ambiguous routes, or you may need to supply additional parameters for this route], exception.message + assert_match %r[content_url has the following required parameters: \["content", :query\] - are they all satisifed?], exception.message end def test_dynamic_path_allowed |