aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-05-03 07:21:35 -0700
committerJosé Valim <jose.valim@gmail.com>2011-05-03 07:21:35 -0700
commitf82767e276b7f6fcd7c0770348cb8f1716365dba (patch)
treee5e68e106e11e5fe2f061c1ecef427e4115797dd /actionpack/test/controller/routing_test.rb
parent7ae3b82ceb83827a6f1c22ee6a6dbcfa0c44d13b (diff)
parent275529446e765cb3c6d1e84bb8c1c8707e1b34a4 (diff)
downloadrails-f82767e276b7f6fcd7c0770348cb8f1716365dba.tar.gz
rails-f82767e276b7f6fcd7c0770348cb8f1716365dba.tar.bz2
rails-f82767e276b7f6fcd7c0770348cb8f1716365dba.zip
Merge pull request #377 from joshk/rails_legacy_mapper_message.
raise an error if the old router draw method is used
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r--actionpack/test/controller/routing_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 18cf944f46..aa9d193436 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -92,6 +92,12 @@ class LegacyRouteSetTests < Test::Unit::TestCase
@rs.clear!
end
+ def test_draw_with_block_arity_one_raises
+ assert_raise(RuntimeError) do
+ @rs.draw { |map| map.match '/:controller(/:action(/:id))' }
+ end
+ end
+
def test_default_setup
@rs.draw { match '/:controller(/:action(/:id))' }
assert_equal({:controller => "content", :action => 'index'}, rs.recognize_path("/content"))