我正在升级我们的代码库以使用 rspec 3.1.0,并在此处关注文档: https ://relishapp.com/rspec/docs/upgrade
现有测试之一在运行 transspec 后出现以下错误。
"with
必须至少有一个参数。使用no_args
matcher 设置不接收参数的期望。"
这是测试。
it 'does something' do
expect(my_method).to receive(:resource)
.with { |path| path.include? 'test' }.and_return({})
end
新的 synatx 不再收到块了吗?