自动测试问题

我刚刚安装了Zentest 4.4.6,其中包括autotest 4.4.6,当我运行自动测试时,我收到以下错误:

gems/ZenTest-4.6.0/lib/autotest.rb:226:in `autodiscover': undefined method `any?' for Gem::Specification:Class (NoMethodError) 

是吧? 就像它没有铁轨就恢复了ruby

我不懂日语,但看着

http://d.hatena.ne.jp/hkj/20110724

我了解到你可以通过改变第226行来实现它:

 # hacky_discovery = Gem::Specification.any? { |s| s.name =~ /^rspec/ } 

 # hacky_discovery = true 

此行在上次修改中被修改: https : //github.com/seattlerb/zentest/commit/b462a8f1dcc03528d91c77cabc15f8575d9c378c

此问题在此处报告: https : //github.com/seattlerb/zentest/issues/5

更新 :要解决此问题,只需升级您的rubygems: gem update --system

更新2 :ZenTest 4.6.1解决了这个问题。

我有这个问题,发现可以通过从rubygems 1.8.6移动到1.8.5来避免这个问题

我刚刚玩了Gemfile中的版本,直到问题消失。 测试组件之间存在一些奇怪的不兼容性。