[rspec-users] Observer not calling inside a spec
raasdnil at gmail.com
Wed Nov 26 06:10:32 EST 2008
On Wed, Nov 26, 2008 at 9:41 PM, David Chelimsky <dchelimsky at gmail.com>wrote:
> On Wed, Nov 26, 2008 at 4:32 AM, Mikel Lindsaar <raasdnil at gmail.com>
> > Sorry David, stupid typo. I am duplicating the text from another screen
> > that is not on the 'net directly. The second spec does not exist.
You are right... doesn't make a lick of difference :)
Although, the new gem builds and installs nicely :)
Any other ideas? Or things you want me to try?
It feels like the observer is not getting instantiated within the Person
class with the spec. Calling the debugger and putting it inside the
Observer class and then running the spec from the command line with
ruby-debug enabled confirms this as the spec never drops into the debugger
Am I missing a load path somewhere?
Putting the debugger within the specification itself and then calling
ActiveRecord::Base.observers returns [:person_observer, .... (other
And the following:
[:person_observer, .... (other observers)]
So that lead me to try instantiating the observers in the spec with
Person.instantiate_observers.... no joy.
Feeling thoroughly clueless at this point.
Rails, RSpec and Life blog....
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users