Test requirement fix (closes #9276) [lazyatom]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7547 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 a5fde998
......@@ -31,9 +31,9 @@ def self.start(*args)
# 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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册