Re: SOLVED Observer not calling inside a spec


#1

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.


#2

On Wed, Nov 26, 2008 at 7:48 AM, Mikel L. removed_email_address@domain.invalid
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


#3

On Thu, Nov 27, 2008 at 12:54 AM, David C.
removed_email_address@domain.invalidwrote:

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