diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2006-08-15 01:28:06 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2006-08-15 01:28:06 +0000 |
commit | 5baf7462c7a6dc6b30eec2b03735fee15e5b0dca (patch) | |
tree | 772db2310eeb4405a554ecb6970665fa3e73f9a5 /actionpack/test | |
parent | 461dce13ae6db3db60256248c1696a6d1660b0c1 (diff) | |
download | rails-5baf7462c7a6dc6b30eec2b03735fee15e5b0dca.tar.gz rails-5baf7462c7a6dc6b30eec2b03735fee15e5b0dca.tar.bz2 rails-5baf7462c7a6dc6b30eec2b03735fee15e5b0dca.zip |
Add controller_paths variable to Routing; Assign Routing.controller_paths from initializer; fix script/about and rails info controller.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 93eded194e..4c3a910bcd 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1514,21 +1514,19 @@ end class RoutingTest < Test::Unit::TestCase def test_possible_controllers - true_load_paths = $LOAD_PATH.dup + true_controller_paths = ActionController::Routing.controller_paths ActionController::Routing.use_controllers! nil Object.send(:const_set, :RAILS_ROOT, File.dirname(__FILE__) + '/controller_fixtures') - $LOAD_PATH.clear - $LOAD_PATH.concat [ + ActionController::Routing.controller_paths = [ RAILS_ROOT, RAILS_ROOT + '/app/controllers', RAILS_ROOT + '/vendor/plugins/bad_plugin/lib' ] assert_equal ["admin/user", "plugin", "user"], ActionController::Routing.possible_controllers.sort ensure - if true_load_paths - $LOAD_PATH.clear - $LOAD_PATH.concat true_load_paths + if true_controller_paths + ActionController::Routing.controller_paths = true_controller_paths end Object.send(:remove_const, :RAILS_ROOT) rescue nil end |