diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-01 15:53:02 -0200 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-18 10:51:12 -0800 |
commit | 99d94f126d05398ec0917d75253ab1548bc54ba3 (patch) | |
tree | db4f2fad04d501d585363cf3eae8de2db3c78894 /actionpack/test/dispatch | |
parent | d34efdd260d7a894537267a6186f16abe1b9335c (diff) | |
download | rails-99d94f126d05398ec0917d75253ab1548bc54ba3.tar.gz rails-99d94f126d05398ec0917d75253ab1548bc54ba3.tar.bz2 rails-99d94f126d05398ec0917d75253ab1548bc54ba3.zip |
Refactoring the redirect method for the router api.
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index c887fe7e6a..19eee379fd 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -2299,6 +2299,11 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest assert_equal "/forced_collision", routes_forced_collision_path end + def test_redirect_argument_error + routes = Class.new { include ActionDispatch::Routing::Redirection }.new + assert_raises(ArgumentError) { routes.redirect Object.new } + end + def test_explicitly_avoiding_the_named_route assert !respond_to?(:routes_no_collision_path) end |