我将 rspec-rails
升级到 3.0.1,现在我在所有测试中都看到此错误
Failure/Error: Sidekiq::Status::complete?(json.jid).should be_true
expected true to respond to `true?`
我找不到解决方案,也找不到我缺少的内容。
最佳答案
从 rspec 3.0 开始,be_true
重命名为 be_truthy
,be_false
重命名为 be_falsey
行为没有改变。所以
(nil).should be_falsey
(false).should be_falsey
将会通过,并且
(anything other than nil or false).should be_truthy
也会通过
来自changelog 3.0.0.beta1 / 2013-11-07
Rename be_true and be_false to be_truthy and be_falsey. (Sam Phippen)
关于ruby-on-rails - 预期 true 会回应 true 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24081843/