aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
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