Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

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

#150

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

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

State: resolved
Milestone: none
Assigned to: TJ Holowaychuk TJ Holowaychuk

Activity

  1. TJ Holowaychuk
    TJ Holowaychuk

    Damn! not good. Ill get on it asap (ps. I try to use the Github issue queue now but no big deal)

    November 12th, 2009 @ 06:43 PM

  2. TJ Holowaychuk
    TJ Holowaychuk
    • State changed from new to resolved

    Fixed in 2.11.12

    November 12th, 2009 @ 06:57 PM

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.