diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-06-01 09:38:09 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-06-01 09:38:09 +0100 |
commit | 9d60525b5fc14b4b6f3ed9ba8ea874d6e76b4f78 (patch) | |
tree | 5a711cacac76a83ad12551023da8524f94e7365b /actionpack/test/controller/routing_test.rb | |
parent | dc7323efd34327c13d26031b68e51314c24360f6 (diff) | |
parent | 9537fd0e3a7625afe4bee75d749647ca1837195a (diff) | |
download | rails-9d60525b5fc14b4b6f3ed9ba8ea874d6e76b4f78.tar.gz rails-9d60525b5fc14b4b6f3ed9ba8ea874d6e76b4f78.tar.bz2 rails-9d60525b5fc14b4b6f3ed9ba8ea874d6e76b4f78.zip |
Merge commit 'mainstream/master'
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 11bffdb42e..6b08a04b10 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -90,6 +90,11 @@ class StaticSegmentTest < Test::Unit::TestCase assert_equal 'Hello World', s.interpolation_chunk end + def test_value_should_not_be_double_unescaped + s = ROUTING::StaticSegment.new('%D0%9A%D0%B0%D1%80%D1%82%D0%B0') # Карта + assert_equal '%D0%9A%D0%B0%D1%80%D1%82%D0%B0', s.interpolation_chunk + end + def test_regexp_chunk_should_escape_specials s = ROUTING::StaticSegment.new('Hello*World') assert_equal 'Hello\*World', s.regexp_chunk @@ -644,9 +649,8 @@ class RoutingTest < Test::Unit::TestCase ActionController::Routing.use_controllers! nil - silence_warnings do - Object.send(:const_set, :RAILS_ROOT, File.dirname(__FILE__) + '/controller_fixtures') - end + Object.send(:remove_const, :RAILS_ROOT) if defined?(::RAILS_ROOT) + Object.const_set(:RAILS_ROOT, File.dirname(__FILE__) + '/controller_fixtures') ActionController::Routing.controller_paths = [ RAILS_ROOT, RAILS_ROOT + '/app/controllers', RAILS_ROOT + '/vendor/plugins/bad_plugin/lib' @@ -2482,7 +2486,8 @@ end class RouteLoadingTest < Test::Unit::TestCase def setup routes.instance_variable_set '@routes_last_modified', nil - silence_warnings { Object.const_set :RAILS_ROOT, '.' } + Object.remove_const(:RAILS_ROOT) if defined?(::RAILS_ROOT) + Object.const_set :RAILS_ROOT, '.' routes.add_configuration_file(File.join(RAILS_ROOT, 'config', 'routes.rb')) @stat = stub_everything |