Using RSpec 3.7.0. I would like to know whether writing
expect(instance).not_to receive(:method)
is completely identical to writing
expect(instance).to receive(:method).never
or if there are any (even subtle) differences or side effects.
As per this link https://github.com/rspec/rspec-mocks/issues/895 You can use either of these to cause an example to fail if a method is called Author @myronmarston also provided an example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With