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, 12 insertions, 2 deletions
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb
index 61914231ef..ee6084dfcd 100644
--- a/activesupport/test/abstract_unit.rb
+++ b/activesupport/test/abstract_unit.rb
@@ -1,15 +1,25 @@
ORIG_ARGV = ARGV.dup
-require 'rubygems'
require 'test/unit'
+begin
+ require 'mocha'
+rescue LoadError
+ $stderr.puts 'Loading rubygems'
+ require 'rubygems'
+ require 'mocha'
+end
+
ENV['NO_RELOAD'] = '1'
$:.unshift "#{File.dirname(__FILE__)}/../lib"
require 'active_support'
require 'active_support/test_case'
+# Include shims until we get off 1.8.6
+require 'active_support/ruby/shim'
+
def uses_memcached(test_name)
- require 'memcache'
+ require 'active_support/vendor/memcache'
begin
MemCache.new('localhost').stats
yield