From ddb4600ce608b14f9fa07bf1196b78e1d43ad999 Mon Sep 17 00:00:00 2001
From: Yehuda Katz <wycats@gmail.com>
Date: Sat, 12 Sep 2009 15:22:11 -0500
Subject: Get ActionPack's test running on bundled gems. This should make
 running tests on new machines, as well as CI, work well.

---
 actionpack/test/abstract_unit.rb        | 9 ++-------
 actionpack/test/new_base/test_helper.rb | 5 +----
 2 files changed, 3 insertions(+), 11 deletions(-)

(limited to 'actionpack/test')

diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index a5222fc96d..528180ae32 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -1,20 +1,15 @@
 $:.unshift(File.dirname(__FILE__) + '/../lib')
-$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib')
-$:.unshift(File.dirname(__FILE__) + '/../../activemodel/lib')
 $:.unshift(File.dirname(__FILE__) + '/lib')
-
 $:.unshift(File.dirname(__FILE__) + '/fixtures/helpers')
 $:.unshift(File.dirname(__FILE__) + '/fixtures/alternate_helpers')
 
+require File.join(File.dirname(__FILE__), "..", "vendor", "gems", "environment")
+
 ENV['TMPDIR'] = File.join(File.dirname(__FILE__), 'tmp')
 
 ENV['new_base'] = "true"
 $stderr.puts "Running old tests on new_base"
 
-require 'rubygems'
-gem "rack", "~> 1.0.0"
-gem "rack-test", "~> 0.4.2"
-
 require 'test/unit'
 require 'active_support'
 require 'active_support/test_case'
diff --git a/actionpack/test/new_base/test_helper.rb b/actionpack/test/new_base/test_helper.rb
index 0833e1a11d..5a901ab9d8 100644
--- a/actionpack/test/new_base/test_helper.rb
+++ b/actionpack/test/new_base/test_helper.rb
@@ -1,10 +1,7 @@
 $:.unshift(File.dirname(__FILE__) + '/../../lib')
-$:.unshift(File.dirname(__FILE__) + '/../../../activesupport/lib')
 $:.unshift(File.dirname(__FILE__) + '/../lib')
 
-require 'rubygems'
-gem "rack", "~> 1.0.0"
-gem "rack-test", "~> 0.4.2"
+require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "vendor", "gems", "environment"))
 
 require 'test/unit'
 require 'active_support'
-- 
cgit v1.2.3