From b203b9b55b0dc35da057cbb9b23277f60bd5260b Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 25 Feb 2007 20:11:18 +0000 Subject: Fixed broken test git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6231 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/routing_test.rb | 7 +++++-- 1 file 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 -- cgit v1.2.3