mocha/rspec有"not_expects"吗?

raf*_*mvc 13 ruby rspec ruby-on-rails mocking mocha.js

我需要确保一个方法不会被调用给出一组特定的条件,而我正在寻找与mocha期望相反的方法.

Jon*_*nah 26

看看摩卡never或者rspec should_not_receiveshould_receive(:selector).exactly(n).times

  • 摩卡链接已过期。[关于Never的新文档](http://gofreerange.com/mocha/docs/Mocha/Expectation.html#never-instance_method) (2认同)