4
我升級我們的代碼庫使用rspec的3.1.0,並在此之後的文檔後錯誤: https://relishapp.com/rspec/docs/upgraderspec`with`必須至少有一個參數。升級到3.1.0
一個現有的測試運行我以後transpec收到以下錯誤的。
「with
必須至少有一個參數,使用no_args
匹配器來設置接收沒有參數的期望。
這是測試。
it 'does something' do
expect(my_method).to receive(:resource)
.with { |path| path.include? 'test' }.and_return({})
end
新的synatx是否不再受到阻擋?
什麼是'my_method'?什麼是「資源」方法定義?請向我們展示您正在測試的代碼。 – 2014-09-11 05:39:24
您升級哪種版本的RSpec? – 2014-09-11 16:33:17