From 99d94f126d05398ec0917d75253ab1548bc54ba3 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 1 Nov 2011 15:53:02 -0200 Subject: Refactoring the redirect method for the router api. --- actionpack/test/dispatch/routing_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack/test/dispatch') 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 -- cgit v1.2.3