Skip to content

Commit

Permalink
Rails info tests needs use_controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Oct 18, 2009
1 parent 91726c2 commit 51e1260
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions railties/test/rails_info_controller_test.rb
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 51e1260

Please sign in to comment.