diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-18 11:13:57 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-18 11:13:57 -0500 |
commit | 51e1260b182b7fd5fda0c3f6b97bb166a578d0e6 (patch) | |
tree | 4929a3436e44d6febe69711c5c654d928bfa7b90 /railties/test | |
parent | 91726c201bf91b08dcb75f8d129d1002c489b79d (diff) | |
download | rails-51e1260b182b7fd5fda0c3f6b97bb166a578d0e6.tar.gz rails-51e1260b182b7fd5fda0c3f6b97bb166a578d0e6.tar.bz2 rails-51e1260b182b7fd5fda0c3f6b97bb166a578d0e6.zip |
Rails info tests needs use_controllers
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/rails_info_controller_test.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/railties/test/rails_info_controller_test.rb b/railties/test/rails_info_controller_test.rb index 99cf9168e1..a0484c0868 100644 --- a/railties/test/rails_info_controller_test.rb +++ b/railties/test/rails_info_controller_test.rb @@ -4,10 +4,6 @@ require 'action_controller' require 'rails/info' require 'rails/info_controller' -ActionController::Routing::Routes.draw do |map| - map.connect ':controller/:action/:id' -end - module ActionController class Base include ActionController::Testing @@ -18,9 +14,17 @@ class InfoControllerTest < ActionController::TestCase tests Rails::InfoController def setup + ActionController::Routing.use_controllers!(['rails/info']) + ActionController::Routing::Routes.draw do |map| + map.connect ':controller/:action/:id' + end @controller.stubs(:consider_all_requests_local => false, :local_request? => true) end + def teardown + ActionController::Routing.use_controllers! nil + end + test "info controller does not allow remote requests" do @controller.stubs(:consider_all_requests_local => false, :local_request? => false) get :properties |