Permalink
Browse files

Rails info tests needs use_controllers

  • Loading branch information...
1 parent 91726c2 commit 51e1260b182b7fd5fda0c3f6b97bb166a578d0e6 @josh josh committed Oct 18, 2009
Showing with 8 additions and 4 deletions.
  1. +8 −4 railties/test/rails_info_controller_test.rb
@@ -4,10 +4,6 @@
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

0 comments on commit 51e1260

Please sign in to comment.