Permalink
Browse files

try to require mocha for testing without checks

  • Loading branch information...
1 parent b3b0f59 commit 839d821041a4cfaa4dfbcc5719ea17ff196189c7 @mislav committed Nov 5, 2009
Showing with 2 additions and 5 deletions.
  1. +2 −5 test/helper.rb
View
@@ -29,11 +29,8 @@ def collect_deprecations
# Wrap tests that use Mocha and skip if unavailable.
def uses_mocha(test_name)
- unless Object.const_defined?(:Mocha)
- gem 'mocha', '>= 0.9.5'
- require 'mocha'
- end
-rescue LoadError => load_error
+ require 'mocha'
+rescue LoadError
$stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again."
else
yield

0 comments on commit 839d821

Please sign in to comment.