最佳答案
The following piece of code works as expected:
Object.any_instance.should_receive(:subscribe)
But when using the new rspec expectation it does not work:
expect(Object.any_instance).to receive(:subscribe)
The error is:
expected: 1 time with any arguments
received: 0 times with any arguments
How can I make this work with expect() to receive?