Rails 3.2.14 プロジェクトがあり、Windows 7 マシンで開発しています。
最近、実行時に次の警告が表示されるようになりましたbundle exec rspec
。
MiniTest::Unit::TestCase is now Minitest::Test. From C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/test/unit/testcase.rb:8:in '<module:Unit>'
MiniTest::Unit::TestCase is now Minitest::Test. From C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.14/lib/active_support/test_case.rb:12:in '<module:ActiveSupport>'
MiniTest::Unit::TestCase is now Minitest::Test. From C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.14/lib/active_support/descendants_tracker.rb:34:in 'inherited'
MiniTest::Unit::TestCase is now Minitest::Test. From C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.14/lib/active_support/descendants_tracker.rb:34:in 'inherited'
MiniTest::Unit::TestCase is now Minitest::Test. From C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.14/lib/active_support/descendants_tracker.rb:34:in 'inherited'
MiniTest::Unit::TestCase is now Minitest::Test. From C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.14/lib/active_support/descendants_tracker.rb:34:in 'inherited'
Run options: include {:focus=>true}
この SO の質問(この MiniTest::Unit::TestCase の警告はどういう意味ですか?) への回答に従って、これを gemfile に追加して minitest 4.0 にダウングレードしようとしました:
gem 'minitest', '~> 4'
ただし、これを行うと、テストが完了すると次のエラーが発生します。
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/minitest-4.7.5/lib/minitest/unit.rb:849:in `write': closed stream (IOError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/minitest-4.7.5/lib/minitest/unit.rb:849:in `puts'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/minitest-4.7.5/lib/minitest/unit.rb:849:in `puts'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/minitest-4.7.5/lib/minitest/unit.rb:1069:in `_run'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/minitest-4.7.5/lib/minitest/unit.rb:1059:in `run'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/minitest-4.7.5/lib/minitest/unit.rb:795:in `block in autorun'
ruby に問題があるのではないかと考えて、1.9.3.p429 にアップグレードしましたが、そこには喜びがなく、動作が持続します。これらを修正するにはどうすればよいですか?