我想修补sprockets-rails中的错误,但是当我运行测试套件(使用ruby-2.0.0-p0以及ruby-head)时,我收到以下错误:
/Users/btaitelb/.rvm/rubies/ruby-head/lib/ruby/2.1.0/test/unit.rb:707:in `block in _prepare_run': undefined method `size' for #<ParallelEach:0x007f823aa55e88> (NoMethodError)
from /Users/btaitelb/.rvm/rubies/ruby-head/lib/ruby/2.1.0/test/unit.rb:707:in `each'
from /Users/btaitelb/.rvm/rubies/ruby-head/lib/ruby/2.1.0/test/unit.rb:707:in `inject'
from /Users/btaitelb/.rvm/rubies/ruby-head/lib/ruby/2.1.0/test/unit.rb:707:in `_prepare_run'
from /Users/btaitelb/.rvm/rubies/ruby-head/lib/ruby/2.1.0/test/unit.rb:648:in `_run_suites'
from /Users/btaitelb/.rvm/gems/ruby-head@rails-dev/gems/minitest-4.7.1/lib/minitest/unit.rb:861:in `_run_anything'
from /Users/btaitelb/.rvm/gems/ruby-head@rails-dev/gems/minitest-4.7.1/lib/minitest/unit.rb:1068:in `run_tests'
from /Users/btaitelb/.rvm/gems/ruby-head@rails-dev/gems/minitest-4.7.1/lib/minitest/unit.rb:1055:in `block in _run'
from /Users/btaitelb/.rvm/gems/ruby-head@rails-dev/gems/minitest-4.7.1/lib/minitest/unit.rb:1054:in `each'
from /Users/btaitelb/.rvm/gems/ruby-head@rails-dev/gems/minitest-4.7.1/lib/minitest/unit.rb:1054:in `_run'
from /Users/btaitelb/.rvm/gems/ruby-head@rails-dev/gems/minitest-4.7.1/lib/minitest/unit.rb:1042:in `run'
from /Users/btaitelb/.rvm/rubies/ruby-head/lib/ruby/2.1.0/test/unit.rb:21:in `run'
from /Users/btaitelb/.rvm/rubies/ruby-head/lib/ruby/2.1.0/test/unit.rb:774:in `run'
from /Users/btaitelb/.rvm/rubies/ruby-head/lib/ruby/2.1.0/test/unit.rb:834:in `run'
from /Users/btaitelb/.rvm/rubies/ruby-head/lib/ruby/2.1.0/test/unit.rb:838:in `run'
from /Users/btaitelb/.rvm/rubies/ruby-head/bin/testrb:7:in `<main>'
我不清楚Test :: Unit和MiniTest之间的关系,特别是因为我看到test / unit.rb引用了MiniTest :: Unit
我可以通过几种方式修补此问题,但我不确定应该责怪哪个项目(例如我应该在哪里提交补丁):
size
来取代对count
的调用,但只有在Test::Unit
期望ParallelEach
时这似乎才合适成为测试套件的一部分count
别名为size
,如果minitest负责将ParallelEach
个对象发送到Test::Unit
这些中的任何一个是否合适,或者是否还有其他事情发生(如命名冲突)?