#150 ✓resolved
Tobias Svensson

Inconsistent 'receive' matcher behavior with 'should.not"

Reported by Tobias Svensson | November 12th, 2009 @ 06:28 PM

receive matcher has inconsistent behavior when used in conjunction with should.not

Consider the following, knowing from the source that this.times falls back to 1:


// This won't pass:
it 'should not pass'
    object.should.not.receive('method')
    object.method()
end

// This will still pass:
it 'should not pass'
    object.should.not.receive('method')
    object.method()
    object.method()
end

However, the following will not pass, though:

it 'should not pass'
    object.should.receive('method', 0)
    object.method()
    object.method()
end

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Tiny, full-featured JavaScript BDD framework.

People watching this ticket

Pages