提交 7de5f69c 编写于 作者: J Joshua Peek

Try to load lib before trying to activate the gem for testing

上级 444ba150
......@@ -27,8 +27,12 @@
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."
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册