Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't push siblings on load path if using bundled env

  • Loading branch information...
commit 4484f0bccf1b02ff1d05d7310afe2e572befce46 1 parent 5b8e627
@jeremy jeremy authored
View
10 actionmailer/test/abstract_unit.rb
@@ -1,9 +1,15 @@
+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__)}/../../actionpack/lib"
+end
+
require 'rubygems'
require 'test/unit'
$:.unshift "#{File.dirname(__FILE__)}/../lib"
-$:.unshift "#{File.dirname(__FILE__)}/../../activesupport/lib"
-$:.unshift "#{File.dirname(__FILE__)}/../../actionpack/lib"
require 'action_mailer'
require 'action_mailer/test_case'
View
13 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
Please sign in to comment.
Something went wrong with that request. Please try again.