我正在尝试从方法[[helper中获取数组[1,2,3,4],该方法由名为basic ,应该使用返回的数组。在编写基本方法的测试时如何指定或硬编码该数组?
allow(self).to receive(:helper).with(params) or use (with_any) .and_return([1,2,3,4]).
在rspec2 @ https://relishapp.com/rspec/rspec-mocks/v/2-99/docs/method-stubs/allow-with-a-simple-return-value上查找更多信息>