Mikel Lindsaar
2008-Nov-26 13:48 UTC
[rspec-users] SOLVED Observer not calling inside a spec
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. -- http://lindsaar.net/ Rails, RSpec and Life blog.... -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081127/e5fb25e2/attachment-0001.html>
David Chelimsky
2008-Nov-26 13:54 UTC
[rspec-users] SOLVED Observer not calling inside a spec
On Wed, Nov 26, 2008 at 7:48 AM, Mikel Lindsaar <raasdnil at 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
Mikel Lindsaar
2008-Nov-26 14:05 UTC
[rspec-users] SOLVED Observer not calling inside a spec
On Thu, Nov 27, 2008 at 12:54 AM, David Chelimsky <dchelimsky at 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 -- http://lindsaar.net/ Rails, RSpec and Life blog.... -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081127/2283e9d4/attachment.html>