aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-11-01 15:53:02 -0200
committerAaron Patterson <aaron.patterson@gmail.com>2011-11-18 10:51:12 -0800
commit99d94f126d05398ec0917d75253ab1548bc54ba3 (patch)
treedb4f2fad04d501d585363cf3eae8de2db3c78894 /actionpack/test/dispatch/routing_test.rb
parentd34efdd260d7a894537267a6186f16abe1b9335c (diff)
downloadrails-99d94f126d05398ec0917d75253ab1548bc54ba3.tar.gz
rails-99d94f126d05398ec0917d75253ab1548bc54ba3.tar.bz2
rails-99d94f126d05398ec0917d75253ab1548bc54ba3.zip
Refactoring the redirect method for the router api.
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb5
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