aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-10-03 05:47:41 +0000
committerRick Olson <technoweenie@gmail.com>2007-10-03 05:47:41 +0000
commit904df818d61b695a5f9508864137d13fffa22d15 (patch)
tree0464c6494e7dd570d9e7b0580a2305def4832d40 /actionpack/test/controller/routing_test.rb
parentb4ec9904c6f34331bbe32a304acf4b43e43a4f18 (diff)
downloadrails-904df818d61b695a5f9508864137d13fffa22d15.tar.gz
rails-904df818d61b695a5f9508864137d13fffa22d15.tar.bz2
rails-904df818d61b695a5f9508864137d13fffa22d15.zip
Move ActionController::Routing.optimise_named_routes to ActionController::Base.optimise_named_routes. Now you can set it in the config.
ActionController::Routing::DynamicSegment#interpolation_chunk should call #to_s on all values before calling URI.escape. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7724 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r--actionpack/test/controller/routing_test.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index ac92af7163..2522b2398b 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -48,7 +48,7 @@ class LegacyRouteSetTests < Test::Unit::TestCase
attr_reader :rs
def setup
# These tests assume optimisation is on, so re-enable it.
- ActionController::Routing.optimise_named_routes = true
+ ActionController::Base.optimise_named_routes = true
@rs = ::ActionController::Routing::RouteSet.new
@rs.draw {|m| m.connect ':controller/:action/:id' }
@@ -852,6 +852,11 @@ class DynamicSegmentTest < Test::Unit::TestCase
assert_equal a_value, eval(%("#{segment.interpolation_chunk}"))
end
+ def test_interpolation_chunk_should_accept_nil
+ a_value = nil
+ assert_equal '', eval(%("#{segment.interpolation_chunk('a_value')}"))
+ end
+
def test_value_regexp_should_be_nil_without_regexp
assert_equal nil, segment.value_regexp
end