diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-07-01 11:16:18 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-07-01 11:16:18 -0700 |
commit | 0515256fd32e6efb67fe90aedf0dadc25dc9e1ba (patch) | |
tree | a2cf4e8c529f4ccb1c5295f33c8f6c09146cf298 /actionpack/test/controller | |
parent | eea7b5db1db5d7e6020c5bcb6b4d85afcbc2e696 (diff) | |
download | rails-0515256fd32e6efb67fe90aedf0dadc25dc9e1ba.tar.gz rails-0515256fd32e6efb67fe90aedf0dadc25dc9e1ba.tar.bz2 rails-0515256fd32e6efb67fe90aedf0dadc25dc9e1ba.zip |
Accept Symbol for contoller name [#2855 state:resolved]
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index c2acc03a1b..16d7df4843 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1667,6 +1667,17 @@ class RouteSetTest < Test::Unit::TestCase assert_equal 1, set.routes.size end + def test_draw_symbol_controller_name + assert_equal 0, set.routes.size + set.draw do |map| + map.connect '/users/index', :controller => :users, :action => :index + end + @request = ActionController::TestRequest.new + @request.request_uri = '/users/index' + assert_nothing_raised { set.recognize(@request) } + assert_equal 1, set.routes.size + end + def test_named_draw assert_equal 0, set.routes.size set.draw do |map| |