提交 314cbea9 编写于 作者: A Aaron Patterson

just call the method and assert the return value

do not test internals
上级 0a7beb1b
......@@ -419,14 +419,7 @@ def test_optimised_named_route_with_host
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 = {})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册