[rspec-users] How do you stub out callbacks?

Jonathan Linowes jonathan at parkerhill.com
Thu Aug 14 12:49:24 EDT 2008


Don't stub out callbacks, rather spec the behavior of the model,  
which might mean stubbing out methods (in a different model?) called  
by the callback.


On Aug 14, 2008, at 9:53 AM, Rob Lacey wrote:

> Hi there,
>
> I'm trying to write a spec for and existing model. It has an  
> after_create callback which I'd like to stub out. Any quick  
> solution to this?
>
> Many thanks
>
> Rob Lacey
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users



More information about the rspec-users mailing list