我有一个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}
根据this SO question的答案(这个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'
认为它可能是红宝石的问题,我升级到1.9.3.p429,但没有喜悦,行为仍然存在。我该如何解决这些问题?