mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Isolation tests intentionally avoid loading any state (because they're 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
This commit is contained in:
@@ -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
|
||||
build_app
|
||||
boot_rails
|
||||
require 'rack/test'
|
||||
extend Rack::Test::Methods
|
||||
end
|
||||
|
||||
def app
|
||||
@app ||= begin
|
||||
boot_rails
|
||||
require "#{app_path}/config/environment"
|
||||
|
||||
Rails.application
|
||||
|
||||
Reference in New Issue
Block a user