Ruby Mocha:是否有与rspec mocks'#你叫你原创?

Ruby Mocha:是否有与rspec mocks'#你叫你原创?,ruby,ruby-mocha,Ruby,Ruby Mocha,Rspec mocks有期望(some_object).接收(:some_method.),并调用\u original。我可以用摩卡咖啡吗?如果可以,怎么做some对象。期望(:some方法)……什么?我很确定没有办法做到这一点 通过查看,有一条评论提到原始方法已被完全替换 # The original implementation of the method is replaced during the test and then restored at the end of the tes

Rspec mocks有
期望(some_object).接收(:some_method.),并调用\u original
。我可以用摩卡咖啡吗?如果可以,怎么做
some对象。期望(:some方法)…
…什么?

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

通过查看,有一条评论提到原始方法已被完全替换

# 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.

为了帮助搜索者找到这个页面:在其他一些模拟框架中,这里要求的是一个
spy
。见例。