diff options
| author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-05-30 08:38:17 -0700 |
|---|---|---|
| committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-05-30 08:38:17 -0700 |
| commit | 6a6eae200d584ce059cff0496675ef382ff5303d (patch) | |
| tree | 4fadad67126674497ab58bb8fbc54b2d340cf2db /actionpack/test/dispatch/routing | |
| parent | c2f3efffd905f8f21eb5ea88687b738fe8a119a2 (diff) | |
| parent | 88e8e951a283823c8e84d6b7f2e13b5cb8974a72 (diff) | |
| download | rails-6a6eae200d584ce059cff0496675ef382ff5303d.tar.gz rails-6a6eae200d584ce059cff0496675ef382ff5303d.tar.bz2 rails-6a6eae200d584ce059cff0496675ef382ff5303d.zip | |
Merge pull request #10785 from senny/10782_routes_inspector_deals_with_controller_regexp
`RoutesInspector` deals with routes using regexp as `:controller` option
Diffstat (limited to 'actionpack/test/dispatch/routing')
| -rw-r--r-- | actionpack/test/dispatch/routing/inspector_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing/inspector_test.rb b/actionpack/test/dispatch/routing/inspector_test.rb index 234ae5764f..4f97d28d2b 100644 --- a/actionpack/test/dispatch/routing/inspector_test.rb +++ b/actionpack/test/dispatch/routing/inspector_test.rb @@ -234,6 +234,15 @@ module ActionDispatch " PUT /posts/:id(.:format) posts#update", " DELETE /posts/:id(.:format) posts#destroy"], output end + + def test_regression_route_with_controller_regexp + output = draw do + get ':controller(/:action)', controller: /api\/[^\/]+/, format: false + end + + assert_equal ["Prefix Verb URI Pattern Controller#Action", + " GET /:controller(/:action) (?-mix:api\\/[^\\/]+)#:action"], output + end end end end |
