From 5a6f30ff0f11f6d685d2601a60700784e3555b8b Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Fri, 20 Jul 2012 09:44:54 +0200 Subject: Make it clear that you can also pass a full url to assert_routing. --- actionpack/lib/action_dispatch/testing/assertions/routing.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_dispatch/testing/assertions/routing.rb b/actionpack/lib/action_dispatch/testing/assertions/routing.rb index 9de545b3c5..2e971cffe1 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/routing.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/routing.rb @@ -37,6 +37,9 @@ module ActionDispatch # # # Test a custom route # assert_recognizes({:controller => 'items', :action => 'show', :id => '1'}, 'view/item1') + # + # # 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_recognizes(expected_options, path, extras={}, message=nil) request = recognized_request_for(path, extras) -- cgit v1.2.3