Output deprecation warning when at_least(0) is sent #231

merged 4 commits into from May 12, 2013


None yet

3 participants


See #133


Thanks, @michihuber. I need to go back and read #133 to fully understand the discussion before merging this, but it looks generally good.

Rather than adding a mock expectation to every example in this group (which would cause them all to fail if the warning is removed), I'd rather see something like:

before { RSpec::Mocks.stub(:warn) }

# the other examples

it 'prints a warning since this is really just a stub' do
  RSpec::Mocks.should_receive(:warn).with(/at_least\(0\) is deprecated/)

Let me know if you also want to deprecate #any_number_of_times.


I think this looks fine now. We've fixed the problems with the specs and I'm generally in favour of this. @myronmarston what do you think?

@samphippen samphippen merged commit 37d9a71 into rspec:master May 12, 2013

1 check passed

default The Travis build passed
@samphippen samphippen added a commit that referenced this pull request May 12, 2013
@samphippen samphippen Add a changelog entry for #231 and #237
Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment