Failing spec for bug: Wrong error message generated by have_received matcher when method was called 2 or more times than expected
Created by: josephks
it do
obj = Object.new
allow(obj).to receive(:enqueue_alert)
5.times{ obj.enqueue_alert }
expect(obj).to have_received(:enqueue_alert).thrice
end
fails with:
expected: 3 times with any arguments
received: 4 times
The message should say received: 5 times