Ruby Mocha:有没有相当于rspec-mocks’#and_call_original?

Rspec-mocks expect(some_object).to receive(:some_method).and_call_original 。 我可以用摩卡这样做,如果是这样,怎么样? some_object.expects(:some_method).... …什么?

我很确定没有办法做到这一点。

查看源代码 ,有一条评论提到原始方法已被完全替换。

 # The original implementation of the method is replaced during the test and then restored at the end of the test. The temporary replacement method has the same visibility as the original method.