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

just call the method and assert the return value

do not test internals
This commit is contained in:
Aaron Patterson 2014-05-09 12:05:24 -07:00
parent 0a7beb1b77
commit 314cbea9a3

View file

@ -419,14 +419,7 @@ class LegacyRouteSetTests < ActiveSupport::TestCase
get 'page' => 'content#show_page', :as => 'pages', :host => 'foo.com'
end
routes = setup_for_named_route
routes.expects(:url_for).with({
:host => 'foo.com',
:only_path => false,
:controller => 'content',
:action => 'show_page',
:use_route => 'pages'
}).once
routes.send(:pages_url)
assert_equal "http://foo.com/page", routes.pages_url
end
def setup_for_named_route(options = {})