diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-29 21:57:51 -0500 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-30 11:59:17 -0700 |
commit | f9bd10054c5f60d82f0a2eb9448dd0b73729e787 (patch) | |
tree | 75cfbcb501dc9c559763fdac41a3218f860c011a /actionpack | |
parent | c79551f02b6437a8e2220a16ec3a32672fb32e90 (diff) | |
download | rails-f9bd10054c5f60d82f0a2eb9448dd0b73729e787.tar.gz rails-f9bd10054c5f60d82f0a2eb9448dd0b73729e787.tar.bz2 rails-f9bd10054c5f60d82f0a2eb9448dd0b73729e787.zip |
Sidestep need for Kernel#silence_warnings
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 1694fc8f3e..6b08a04b10 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -649,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' @@ -2487,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 |