我刚刚安装了包含AutoTest 4.4.6的Zentest 4.4.6,当我运行自动电场时,我会收到以下错误:

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

嗯?就像它恢复了没有铁轨的红宝石

有帮助吗?

解决方案

我不知道日语,但看着

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解决了这个问题。

其他提示

我遇到了这个问题,发现可以通过从红宝石1.8.6到1.8.5来避免这种问题。

我只是在Gemfile中玩过版本,直到问题消失了。测试组件之间存在一些怪异的不相容性。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top