1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fixed broken test

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6231 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2007-02-25 20:11:18 +00:00
parent 793c9ff68d
commit b203b9b55b

View file

@ -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