1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Test requirement fix (closes #9276) [lazyatom]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7547 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2007-09-22 17:37:39 +00:00
parent a5fde99873
commit 6ccf503229

View file

@ -31,9 +31,9 @@ end
# Wrap tests that use Mocha and skip if unavailable.
def uses_mocha(test_name)
require 'mocha'
gem 'mocha', ">=0.5"
require 'stubba'
yield
rescue LoadError
$stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again."
rescue Gem::LoadError
$stderr.puts "Skipping #{test_name} tests (Mocha >= 0.5 is required). `gem install mocha` and try again."
end