diff options
author | Sytse Sijbrandij <sytse@dosire.com> | 2012-07-20 09:44:54 +0200 |
---|---|---|
committer | Sytse Sijbrandij <sytse@dosire.com> | 2012-07-20 09:44:54 +0200 |
commit | 5a6f30ff0f11f6d685d2601a60700784e3555b8b (patch) | |
tree | e151fa4e4fc07d7be94da5eef9e73ec09c907428 /actionpack/lib | |
parent | 11d488dd7a5adf1c5c5044ee2cdd96e127e67cd4 (diff) | |
download | rails-5a6f30ff0f11f6d685d2601a60700784e3555b8b.tar.gz rails-5a6f30ff0f11f6d685d2601a60700784e3555b8b.tar.bz2 rails-5a6f30ff0f11f6d685d2601a60700784e3555b8b.zip |
Make it clear that you can also pass a full url to assert_routing.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/routing.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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) |