diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-05-03 16:07:25 +0200 |
---|---|---|
committer | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-05-03 16:07:25 +0200 |
commit | 275529446e765cb3c6d1e84bb8c1c8707e1b34a4 (patch) | |
tree | 2a5f0c9cad9e0530d3993967a0ce3a19d3003a2d /actionpack/test | |
parent | ed3e667415e191d1677a3b7e55b077f55504214c (diff) | |
download | rails-275529446e765cb3c6d1e84bb8c1c8707e1b34a4.tar.gz rails-275529446e765cb3c6d1e84bb8c1c8707e1b34a4.tar.bz2 rails-275529446e765cb3c6d1e84bb8c1c8707e1b34a4.zip |
raise an error if the old router draw method is used, along with a message advising them to either upgrade their routes or add rails_legacy_mapper to their Gemfile
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 6 |
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")) |