aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/abstract_unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/abstract_unit.rb')
-rw-r--r--activesupport/test/abstract_unit.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb
index af9656615c..f390c66838 100644
--- a/activesupport/test/abstract_unit.rb
+++ b/activesupport/test/abstract_unit.rb
@@ -1,4 +1,12 @@
ORIG_ARGV = ARGV.dup
+root = File.expand_path('../../..', __FILE__)
+begin
+ require "#{root}/vendor/gems/environment"
+rescue LoadError
+ $:.unshift("#{root}/activesupport/lib")
+ $:.unshift("#{root}/activerecord/lib")
+end
+
require 'test/unit'
@@ -11,7 +19,6 @@ rescue LoadError
end
ENV['NO_RELOAD'] = '1'
-$:.unshift "#{File.dirname(__FILE__)}/../lib"
require 'active_support'
require 'active_support/test_case'