[rspec-users] Weird behavior with should_not_receive

David Chelimsky dchelimsky at gmail.com
Sun Nov 6 17:55:22 EST 2011

On Nov 6, 2011, at 4:45 PM, Alex Chaffee wrote:

> Double negatives are not unconfusing.
> Not unlike chaining mutable decorator objects.
> (I was tempted to say "non-immutable" but that would chain the jokes)
> btw with .once and .twice, why not .thrice? Lady or no.

module Thrice
  def thrice(&block)
    exactly(3).times &block

RSpec::Mocks::MessageExpectation.send :include, Thrice

There you go :)

More information about the rspec-users mailing list