Reputation: 2891
Old code to check receive in rspec
object.should_receive(:message)
As per the new rspec syntex,we can write this code to check should_recieve
allow(object).to receive(:message)
But how do I check for something like this
allow(object).to_not receive(:message)
earlier we used to check this way
object.should_not_receive(:message) # I need a new syntax with latest rspec.
I am not able to find any doc
Thanks in advance.
Upvotes: 4
Views: 232