Re: [rspec-users] Observer not calling inside a spec

2008-11-26 Thread Mikel Lindsaar
OK, in the app I have some name spaced classes under a 'int' directory. Some of these classes have observers and they have the same name as the top level classes. If I make a new observer in the top level that shares a name with an observer inside the namespace, the specs work. If I create an ob

Re: [rspec-users] Observer not calling inside a spec

2008-11-26 Thread Mikel Lindsaar
And the weirdness continues... Making a new observer against a different (empty) model works as expected. Deleting the entire person model down to just the class declaration, still does not work. >:| -- http://lindsaar.net/ Rails, RSpec and Life blog ___

Re: [rspec-users] Observer not calling inside a spec

2008-11-26 Thread Mikel Lindsaar
On Wed, Nov 26, 2008 at 10:10 PM, Mikel Lindsaar <[EMAIL PROTECTED]> wrote: > Am I missing a load path somewhere? > OK, I've ruled this out. I did: class PersonObserver < ActiveRecord::Observer raise end $ ruby spec/observers/person_observer.rb Throws an exception as expected... so l

Re: [rspec-users] Observer not calling inside a spec

2008-11-26 Thread Mikel Lindsaar
On Wed, Nov 26, 2008 at 9:41 PM, David Chelimsky <[EMAIL PROTECTED]>wrote: > On Wed, Nov 26, 2008 at 4:32 AM, Mikel Lindsaar <[EMAIL PROTECTED]> > wrote: > > Sorry David, stupid typo. I am duplicating the text from another screen > > that is not on the 'net directly. The second spec does not exi

Re: [rspec-users] Observer not calling inside a spec

2008-11-26 Thread David Chelimsky
On Wed, Nov 26, 2008 at 4:32 AM, Mikel Lindsaar <[EMAIL PROTECTED]> wrote: > >> I see two examples with identical code. Do they both fail, or just the >> 2nd one? If so, there was a bug in which mocked inherited class >> methods were not properly restored after the example. This is fixed in >> git,

Re: [rspec-users] Observer not calling inside a spec

2008-11-26 Thread Mikel Lindsaar
> I see two examples with identical code. Do they both fail, or just the > 2nd one? If so, there was a bug in which mocked inherited class > methods were not properly restored after the example. This is fixed in > git, but not released. > > Would you mind building the gem from the latest and see if

Re: [rspec-users] Observer not calling inside a spec

2008-11-26 Thread David Chelimsky
On Wed, Nov 26, 2008 at 4:08 AM, Mikel Lindsaar <[EMAIL PROTECTED]> wrote: > OK, I can't figure this out. > RSpec 1.1.8 > RSpecRails 1.1.8 > Rails 2.1.1 > I have a model > #app/models/person.rb > class Person < ActiveRecord::Base ># The model has a lot of code in it, but even deleting >#