diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-05-30 08:39:57 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-05-30 08:39:57 +0200 |
commit | 88e8e951a283823c8e84d6b7f2e13b5cb8974a72 (patch) | |
tree | 4fadad67126674497ab58bb8fbc54b2d340cf2db /actionpack/test/dispatch | |
parent | c2f3efffd905f8f21eb5ea88687b738fe8a119a2 (diff) | |
download | rails-88e8e951a283823c8e84d6b7f2e13b5cb8974a72.tar.gz rails-88e8e951a283823c8e84d6b7f2e13b5cb8974a72.tar.bz2 rails-88e8e951a283823c8e84d6b7f2e13b5cb8974a72.zip |
`RoutesInspector` deals with routes using regexp as `:controller` option
Diffstat (limited to 'actionpack/test/dispatch')
-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 |