aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-10-14 20:59:45 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-10-14 20:59:45 -0700
commit4484f0bccf1b02ff1d05d7310afe2e572befce46 (patch)
treef0044be5443781306161f9f5e5ea30c618b5cc82 /actionpack/test
parent5b8e6279acaa46f22118122c49350e1b08c7371a (diff)
downloadrails-4484f0bccf1b02ff1d05d7310afe2e572befce46.tar.gz
rails-4484f0bccf1b02ff1d05d7310afe2e572befce46.tar.bz2
rails-4484f0bccf1b02ff1d05d7310afe2e572befce46.zip
Don't push siblings on load path if using bundled env
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/abstract_unit.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index 4820f00aa1..0d65bdb5b9 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -1,14 +1,17 @@
+bundled = "#{File.dirname(__FILE__)}/../vendor/gems/environment"
+if File.exist?("#{bundled}.rb")
+ require bundled
+else
+ $:.unshift "#{File.dirname(__FILE__)}/../../activesupport/lib"
+ $:.unshift "#{File.dirname(__FILE__)}/../../activemodel/lib"
+end
+
$:.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')
-bundler = File.join(File.dirname(__FILE__), '..', 'vendor', 'gems', 'environment')
-require bundler if File.exist?("#{bundler}.rb")
-
begin
%w( rack rack/test sqlite3 ).each { |lib| require lib }
rescue LoadError => e