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.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb
index af9656615c..dda139372e 100644
--- a/activesupport/test/abstract_unit.rb
+++ b/activesupport/test/abstract_unit.rb
@@ -1,17 +1,17 @@
ORIG_ARGV = ARGV.dup
-require 'test/unit'
-
begin
- require 'mocha'
+ require File.expand_path('../../../vendor/gems/environment', __FILE__)
rescue LoadError
- $stderr.puts 'Loading rubygems'
- require 'rubygems'
- require 'mocha'
end
+lib = File.expand_path("#{File.dirname(__FILE__)}/../lib")
+$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib)
+
+require 'test/unit'
+require 'mocha'
+
ENV['NO_RELOAD'] = '1'
-$:.unshift "#{File.dirname(__FILE__)}/../lib"
require 'active_support'
require 'active_support/test_case'