From d50413826f1892b5d1250f578b283d52b85b4f6c Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 17 Oct 2009 16:36:39 -0500 Subject: [PATCH] Invalid route requirements should always raise an exception even if they are unused --- actionpack/test/controller/routing_test.rb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 7c88520bac..cd13f36681 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1019,14 +1019,6 @@ class RouteSetTest < ActiveSupport::TestCase map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /\d+\z/ end end - assert_nothing_raised do - set.draw do |map| - map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /\d+/, :name => /^(david|jamis)/ - end - assert_raise ActionController::RoutingError do - set.generate :controller => 'pages', :action => 'show', :id => 10 - end - end end def test_route_requirements_with_invalid_http_method_is_invalid