Re: SOLVED Observer not calling inside a spec

Hands up all the people in here who feel stupid

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.

On Wed, Nov 26, 2008 at 7:48 AM, Mikel L. [email protected]
wrote:

Hands up all the people in here who feel stupid

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 :slight_smile:

Cheers,
David

On Thu, Nov 27, 2008 at 12:54 AM, David C.
[email protected]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 :slight_smile:

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 :slight_smile:

Mikel

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs