最近、Rails アプリをテストするために Zeus と Minitest をセットアップしました。
ただし、次のエラーが発生しました。
leo% zeus test
/Users/leo/.rvm/gems/ruby-1.9.3-p125@backscratchers/gems/turn-0.9.6/lib/turn/minitest.rb:23:in `<top (required)>': MiniTest v5.0.8 is out of date.
`gem install minitest` and add `gem 'minitest' to you test helper. (RuntimeError)
from /Users/leo/.rvm/gems/ruby-1.9.3-p125@backscratchers/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /Users/leo/.rvm/gems/ruby-1.9.3-p125@backscratchers/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
... etc ...
Turn gem に記載されている行は次のとおりです。
# set MiniTest's runner to Turn::MiniRunner instance
if MiniTest::Unit.respond_to?(:runner=)
MiniTest::Unit.runner = Turn::MiniRunner.new
else
raise "MiniTest v#{MiniTest::Unit::VERSION} is out of date.\n" \
"`gem install minitest` and add `gem 'minitest' to you test helper."
#MiniTest::Unit = Turn::MiniRunner
end
そのため、「時代遅れ」はおそらく誤解を招く可能性があります。それが本当に意味することは、API が期待されたものではないということですよね?
gem 'turn'
Gemfile から削除して を実行bundle install
し、Zeus を再起動しました。
今私は得る:
/Users/leo/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:328:in `autorun': uninitialized class variable @@installed_at_exit in Test::Unit::Runner (NameError)
from /Users/leo/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:640:in `<top (required)>'
from /Users/leo/.rvm/gems/ruby-1.9.3-p125@backscratchers/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /Users/leo/.rvm/gems/ruby-1.9.3-p125@backscratchers/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/leo/.rvm/gems/ruby-1.9.3-p125@backscratchers/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `l
... etc ...
何が起きてる?Minitest のバージョンが間違っているのでしょうか? なぜ Bundler は依存関係チェーンを把握できなかったのか、それがポイントだと思いました。
どんな提案でも大歓迎です。