Thanks, Sean.

Another note.  If you have any unit tests relating to the model that's been
stubbed, you'll need to explicitly require the real model.  Something like:

  require File.dirname(__FILE__) + '/../../app/models/order_mailer'


~Barry



On 7/18/07, Sean Cribbs <[EMAIL PROTECTED]> wrote:
>
> Barry Hess wrote:
> > Thanks for the hints, Sean.
> >
> > In extensions/shopping_cart/test/test_helper.rb I required the stub/mock
> > model object:
> >
> >   require File.dirname(__FILE__) + "/mocks/test/order_mailer"
> >
> Dir-glob to the rescue! Try this:
>
> Dir[File.dirname(__FILE__) + "/mocks/test/*.rb].each do |file|
>   require file
> end
>
> That will load all of your mocks in the test helper.
>
> Sean
> _______________________________________________
> Radiant mailing list
> Post:   [email protected]
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>



-- 
Barry Hess
[EMAIL PROTECTED]
http://www.bjhess.com
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to