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.

'never' expectation failed: twisted message

#52
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)

Reported by dira · August 8th, 2009 @ 03:14 PM

State: resolved
Milestone: none
Assigned to: James Mead James Mead

Activity

  1. James Mead
    James Mead
    • 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.

    November 30th, 2010 @ 09:48 AM

  2. dira
    dira

    Thanks James, that looks great.

    November 30th, 2010 @ 02:18 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.