最佳答案
我的测试里有这个
Project.should_receive(:find).with(@project).and_return(@project)
但是当对象接收该方法调用两次时,我必须这样做
Project.should_receive(:find).with(@project).and_return(@project)
Project.should_receive(:find).with(@project).and_return(@project)
有没有什么方法可以说
Project.should_receive(:find).with(@project).and_return(@project).times(2)