From 6873b1d6589c0e8f1c29f156fb1841e165f3a127 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sun, 18 Oct 2009 00:26:36 -0500 Subject: [PATCH] Don't use use_controllers in routing tests --- actionpack/test/controller/routing_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 83b26ba5a9..8a9862a287 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -22,7 +22,6 @@ end # See RFC 3986, section 3.3 for allowed path characters. class UriReservedCharactersRoutingTest < Test::Unit::TestCase def setup - ActionController::Routing.use_controllers! ['controller'] @set = ActionController::Routing::RouteSet.new @set.draw do |map| map.connect ':controller/:action/:variable/*additional' @@ -36,8 +35,9 @@ class UriReservedCharactersRoutingTest < Test::Unit::TestCase end def test_route_generation_escapes_unsafe_path_characters - assert_equal "/contr#{@segment}oller/act#{@escaped}ion/var#{@escaped}iable/add#{@escaped}itional-1/add#{@escaped}itional-2", - @set.generate(:controller => "contr#{@segment}oller", + @set.generate(:controller => "content", :action => "act#{@segment}ion", :variable => "variable", :additional => "foo") + assert_equal "/content/act#{@escaped}ion/var#{@escaped}iable/add#{@escaped}itional-1/add#{@escaped}itional-2", + @set.generate(:controller => "content", :action => "act#{@segment}ion", :variable => "var#{@segment}iable", :additional => ["add#{@segment}itional-1", "add#{@segment}itional-2"]) @@ -52,7 +52,7 @@ class UriReservedCharactersRoutingTest < Test::Unit::TestCase end def test_route_generation_allows_passing_non_string_values_to_generated_helper - assert_equal "/controller/action/variable/1/2", @set.generate(:controller => "controller", + assert_equal "/content/action/variable/1/2", @set.generate(:controller => "content", :action => "action", :variable => "variable", :additional => [1, 2])