我有类似的东西:
value = nil
if some_condition
value =my_object.do_stuff()
end
在我的测试中,我有以下几点:
MyObject.any_instance.should_receive(:do_stuff)
但是,我只想测试该方法是否被调用,并让它执行原始代码。我不想这样做:
MyObject.any_instance.should_receive(:do_stuff).and_return(:some_dummy_value)
有没有办法做到这一点?