From 4484f0bccf1b02ff1d05d7310afe2e572befce46 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 14 Oct 2009 20:59:45 -0700 Subject: Don't push siblings on load path if using bundled env --- actionpack/test/abstract_unit.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'actionpack/test') 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 -- cgit v1.2.3