#548 √ resolved
Mathias Meyer

[PATCH] Previously stubbed method doesn't fail on should_not_receive

Reported by Mathias Meyer | October 1st, 2008 @ 03:29 PM | in 1.1.6

The simple use case of this piece of code does not fail when the method is call, as it used to, and results in sort of a false safety of the test suite.


@instance.stub!(:method)
@instance.should_not_receive(:method)
@instance.method # should fail but doesn't

The attached patches the code that introduced the bug to respect negative method expectations.

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

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

Behaviour Driven Development for Ruby.

Shared Ticket Bins

People watching this ticket