I've been using Mocha in my extensions for a little while now.  All I do is
require 'rubygems' (unnecessary I know, but it's habit) and 'mocha'.
I guess RSpec is getting closer to stable, so maybe it's time for a second
look.


-Andrew

On 7/18/07, Sean Cribbs <[EMAIL PROTECTED]> wrote:
>
> I don't believe test/mocks/test is included in the load path, as we've
> never had anyone using mocks in extensions yet. In
> extension/test/test_helper.rb, you should probably require them
> specifically, or in the individual tests. If there is a canonical way
> (i.e. the Rails way) that they are loaded, any info about that would be
> appreciated.
>
> Honestly, I've fallen in love with RSpec lately and appreciate the power
> of mocks and stubs... good call.
>
> Sean
>
> Barry Hess wrote:
> > Hi,
> >
> > Currently I'm writing some tests for a front end shopping cart extension
> I
> > wrote for a client.  Of course, for the functional testing I'd like to
> stub
> > out some models to verify proper methods are being called by my
> controller.
> > Unfortunately this doesn't appear to be "just working" under the
> extension
> > model like it does in Rails.
> >
> > In fact, it doesn't appear that my stub objects in
> > extension/test/mocks/test/ are even being loaded.  I realize it may be
> that
> > the load path in a Radiant environment does not even bother looking for
> > stubs first.
> >
> > Is anyone aware of a way to stub models in Radiant extension
> testing?  Is
> > anyone aware of the load path ordering in Radiant?
> >
> > Any help or insight is appreciated!
> >
>
> _______________________________________________
> Radiant mailing list
> Post:   [email protected]
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
_______________________________________________
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