Browse files

Isolation tests intentionally avoid loading any state (because they'r…

…e often testing things that have their own load path semantics that should not be polluted), so rack/test is not yet on the load path. Moving require "rack/test" into the setup means and after boot_rails means that it'll be required after the laod path has been altered to add in the Rails vendor/gems
  • Loading branch information...
1 parent 38aeb15 commit 83be262b4b2e415fe9be319eb6b187bcf415fb6d Carlhuda committed Dec 24, 2009
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/test/application/routing_test.rb
6 railties/test/application/routing_test.rb
@@ -1,18 +1,18 @@
require 'isolation/abstract_unit'
-require 'rack/test'
module ApplicationTests
class RoutingTest < Test::Unit::TestCase
include ActiveSupport::Testing::Isolation
- include Rack::Test::Methods
def setup
+ boot_rails
+ require 'rack/test'
+ extend Rack::Test::Methods
def app
@app ||= begin
- boot_rails
require "#{app_path}/config/environment"

0 comments on commit 83be262

Please sign in to comment.