aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-10-18 00:26:36 -0500
committerJoshua Peek <josh@joshpeek.com>2009-10-18 00:26:36 -0500
commit6873b1d6589c0e8f1c29f156fb1841e165f3a127 (patch)
treeb5599fc2262a9329533cfe3ce3aebb73bdf7d8b3 /actionpack/test
parent2c3ca9ae80c0ec30ce1aede77c4dafc55bf2957e (diff)
downloadrails-6873b1d6589c0e8f1c29f156fb1841e165f3a127.tar.gz
rails-6873b1d6589c0e8f1c29f156fb1841e165f3a127.tar.bz2
rails-6873b1d6589c0e8f1c29f156fb1841e165f3a127.zip
Don't use use_controllers in routing tests
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/routing_test.rb8
1 files 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])