Permalink
Browse files

For testing, only load rubygems if mocha is missing

  • Loading branch information...
1 parent 2745846 commit ec01cc4510092864eee36109d2486caed9be5cae @josh josh committed Sep 14, 2009
Showing with 8 additions and 1 deletion.
  1. +8 −1 activesupport/test/abstract_unit.rb
@@ -1,8 +1,15 @@
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'

0 comments on commit ec01cc4

Please sign in to comment.