diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-09-14 00:41:04 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-09-14 00:41:04 -0500 |
commit | ec01cc4510092864eee36109d2486caed9be5cae (patch) | |
tree | ec69f745e03a293148bd788d45aba01657646e32 /activesupport/test | |
parent | 27458464d6cc33ef8aad1d88baa882f4d5556193 (diff) | |
download | rails-ec01cc4510092864eee36109d2486caed9be5cae.tar.gz rails-ec01cc4510092864eee36109d2486caed9be5cae.tar.bz2 rails-ec01cc4510092864eee36109d2486caed9be5cae.zip |
For testing, only load rubygems if mocha is missing
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/abstract_unit.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index 4bc035c439..ee6084dfcd 100644 --- a/activesupport/test/abstract_unit.rb +++ b/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' |