Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Better error messages for relative counts #252

Closed
myronmarston opened this Issue Mar 29, 2013 · 1 comment

Comments

Projects
None yet
1 participant
Owner

myronmarston commented Mar 29, 2013

  example do
    dbl = double
    dbl.should_receive(:foo).at_least(2).times
    dbl
  end

Failure:

  1) RSpec::Mocks
     Failure/Error: dbl.should_receive(:foo).at_least(2).times
       (Double).foo(any args)
           expected: 2 times
           received: 0 times

The relative counts do not affect the failure message. It should say: expected: at least 2 times. I noticed this when reviewing #241 as I had noticed the new test spies do not provide the level of detail that would be user friendly, and then noticed that that's the case for existing mock expectation failures as well.

Owner

myronmarston commented Apr 2, 2013

Fixed by #255.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment