本文介绍了如何将宝石"minitest"添加到我的测试助手中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是Ruby on Rails和测试的新手.当我运行rake test
时,出现以下错误:
I am new to Ruby on Rails and testing. When I run rake test
I get the following error:
/Users/jarvis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/rack-1.3.4/lib/rack/backports
/uri/common_192.rb:53: warning: already initialized constant WFKV_
/Users/jarvis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/turn-0.8.3/lib/turn/autorun
/minitest.rb:14:in `<top (required)>': MiniTest v1.6.0 is out of date. (RuntimeError)
`gem install minitest` and add `gem 'minitest' to you test helper.
from /Users/jarvis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/activesupport-3.1.1/lib
/active_support/dependencies.rb:240:in `require'
我做了gem install minitest
,现在它说要将gem'minitest'添加到我的测试助手中.这是test/test_helper.rb
,如果是,该如何添加"最小测试?
I did gem install minitest
and now it says to add gem 'minitest' to my test helper. Is this test/test_helper.rb
, and if so, how do I "add" minitest?
推荐答案
编辑Gemfile,以便在测试组下指定gem,如下所示:
Edit your Gemfile so that the gem is specified under the test group, like so:
group :test do
gem "minitest"
end
(将OP编辑过的解决方案发布到问题中,但未作为答案发布)
这篇关于如何将宝石"minitest"添加到我的测试助手中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!