#52 ✓resolved
dira

'never' expectation failed: twisted message

Reported by dira | 2009-08-08 15:14:18 UTC

s=''
s.expects(:fancy).with(2).never
s.fancy(2)

should result in:

Mocha::ExpectationError: unexpected invocation: ''.fancy(2)

but it prints:

Mocha::ExpectationError: unexpected invocation: ''.fancy(2)
satisfied expectations:
- expected never, not yet invoked: ''.fancy(2)

Comments and changes to this ticket

  • James Mead

    James Mead 2010-11-30 09:48:10 UTC

    • State changed from “new” to “resolved”
    • Milestone order changed from “0” to “0”

    @dira: Sorry for the (very) late response. I've just made an attempt to make the failure message less confusing. You should now see something like this :-

    Mocha::ExpectationError: unexpected invocation: ''.fancy(2)
    unsatisfied expectations:
    - expected never, invoked once: ''.fancy(2)
    

    I hope you don't mind, but I'm going to close this ticket.

  • dira

    dira 2010-11-30 14:18:15 UTC

    Thanks James, that looks great.

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 ยป

A mocking & stubbing library for Ruby.

* GitHub repository
* Documentation
* Mailing List

People watching this ticket

Tags

Pages