diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-05 10:01:46 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-05 10:01:46 -0500 |
commit | 7de5f69cc6bc9a946afd3a0fa0ec785f9fb94fb5 (patch) | |
tree | 5caae259ac4936d43e91853b08e5370bff350edb /railties | |
parent | 444ba150bd344793ebd0bd5efa6efd93fee89a7c (diff) | |
download | rails-7de5f69cc6bc9a946afd3a0fa0ec785f9fb94fb5.tar.gz rails-7de5f69cc6bc9a946afd3a0fa0ec785f9fb94fb5.tar.bz2 rails-7de5f69cc6bc9a946afd3a0fa0ec785f9fb94fb5.zip |
Try to load lib before trying to activate the gem for testing
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/abstract_unit.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/railties/test/abstract_unit.rb b/railties/test/abstract_unit.rb index 4510e6241c..50c427dc64 100644 --- a/railties/test/abstract_unit.rb +++ b/railties/test/abstract_unit.rb @@ -27,8 +27,12 @@ else end def uses_gem(gem_name, test_name, version = '> 0') - gem gem_name.to_s, version - require gem_name.to_s + begin + require gem_name.to_s + rescue LoadError + gem gem_name.to_s, version + require gem_name.to_s + end yield rescue LoadError $stderr.puts "Skipping #{test_name} tests. `gem install #{gem_name}` and try again." |