Skip to content
Browse files

Make it clear that you can also pass a full url to assert_routing.

  • Loading branch information...
1 parent 3b3ca13 commit 32e95866b98705bbba5a8235c79165c08aa4285c @dosire committed Jul 19, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 actionpack/lib/action_dispatch/testing/assertions/routing.rb
View
3 actionpack/lib/action_dispatch/testing/assertions/routing.rb
@@ -110,6 +110,9 @@ def assert_generates(expected_path, options, defaults={}, extras = {}, message=n
#
# # Tests a route with a HTTP method
# assert_routing({ :method => 'put', :path => '/product/321' }, { :controller => "product", :action => "update", :id => "321" })
+ #
+ # # Path can be a full url (with ://) to test routing based on constrains such as subdomain or host
+ # assert_routing 'http://api.example.com/', :controller => 'api', :action => 'index'
def assert_routing(path, options, defaults={}, extras={}, message=nil)
assert_recognizes(options, path, extras, message)

0 comments on commit 32e9586

Please sign in to comment.
Something went wrong with that request. Please try again.