Forum: RSpec Re: SOLVED Observer not calling inside a spec

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fb1a6916e06f221b5b53a6665f9858eb?d=identicon&s=25 Mikel Lindsaar (Guest)
on 2008-11-26 14:49
(Received via mailing list)
Hands up all the people in here who feel stupid

<hand goes up>

Thanks.

Problem was that I had an errant stub!(:notify) in a factory method.
That
factory method was only called on certain classes.  Those classes were
the
ones failing.

My bad.
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2008-11-26 14:55
(Received via mailing list)
On Wed, Nov 26, 2008 at 7:48 AM, Mikel Lindsaar <raasdnil@gmail.com>
wrote:
> Hands up all the people in here who feel stupid
> <hand goes up>
> Thanks.
> Problem was that I had an errant stub!(:notify) in a factory method.  That
> factory method was only called on certain classes.  Those classes were the
> ones failing.
> My bad.

Ouch!

Good lesson though. Keep your test data close, and your mocks and stubs
closer.

Thanks for reporting and congrats on being able to move on :)

Cheers,
David
Fb1a6916e06f221b5b53a6665f9858eb?d=identicon&s=25 Mikel Lindsaar (Guest)
on 2008-11-26 15:06
(Received via mailing list)
On Thu, Nov 27, 2008 at 12:54 AM, David Chelimsky
<dchelimsky@gmail.com>wrote:

> Ouch!
>
> Good lesson though. Keep your test data close, and your mocks and stubs
> closer.
>
> Thanks for reporting and congrats on being able to move on :)


Yeah... finding it involved walking through the entire call cycle from
AR/callbacks.rb through and then doing a p
find_matching_method_stub(sym,
*args) from within spec/mocks/proxy.rb...

I almost fell off my chair when it didn't come back with nil :)

Mikel
This topic is locked and can not be replied to.