Rspec-mocks にはexpect(some_object).to receive(:some_method).and_call_original. Mocha でこれを行うことはできますか? some_object.expects(:some_method).......何?
2131 次
1 に答える
13
これを行う方法はないと確信しています。
ソースコードを見てみると、元のメソッドが完全に置き換えられているというコメントがあります。
# 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.
于 2014-03-29T06:29:20.397 に答える