Skip to content

Commit

Permalink
try to require mocha for testing without checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Nov 5, 2009
1 parent b3b0f59 commit 839d821
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/helper.rb
Expand Up @@ -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
Expand Down

0 comments on commit 839d821

Please sign in to comment.