提交 e36f82b7 编写于 作者: J Justin Collins

Add test for dynamic controller name in routes

上级 7c292f58
...@@ -39,6 +39,10 @@ Rails3::Application.routes.draw do ...@@ -39,6 +39,10 @@ Rails3::Application.routes.draw do
get "home/test_dynamic_render" get "home/test_dynamic_render"
controller "a#{controller_name}" do
get "some_route"
end
# The priority is based upon order of creation: # The priority is based upon order of creation:
# first created -> highest priority. # first created -> highest priority.
......
...@@ -713,7 +713,7 @@ class Rails3Tests < Test::Unit::TestCase ...@@ -713,7 +713,7 @@ class Rails3Tests < Test::Unit::TestCase
def test_default_routes def test_default_routes
assert_warning :warning_type => "Default Routes", assert_warning :warning_type => "Default Routes",
:line => 97, :line => 101,
:message => /All public methods in controllers are available as actions/, :message => /All public methods in controllers are available as actions/,
:file => /routes\.rb/ :file => /routes\.rb/
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册