[rspec-users] Specs for code stored in rails_app/lib/

David Chelimsky dchelimsky at gmail.com
Thu May 24 17:31:09 EDT 2007


On 5/24/07, Luis Lavena <luislavena at gmail.com> wrote:
> On 5/24/07, Coda Hale <coda.hale at gmail.com> wrote:
> > On 5/24/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> > > On 5/24/07, Coda Hale <coda.hale at gmail.com> wrote:
> > > > A related question -- where do spec support files go? For example,
> > > > I've got more than a few one-off matchers and such, and having a
> > > > 500-line spec_helper.rb doesn't seem workable.
> > > >
> > > > I ended up putting mine in /spec/lib, and the specs for /lib files in
> > > > /libraries.
> > >
> > > I'd definitely have the specs for lib in spec/lib. As for your
> > > helpers, how about spec/helpers????
> >
> > Thanks for the quick reply!
> >
> > I'm not sure if I was clear -- I'm not looking for a place to put the
> > specs for my helpers. That's obviously /sepc/helpers. I'm looking for
> > a place to put the support classes for the specs -- custom matchers,
> > etc. If I stuff them all in spec_helper.rb, it'll grow to be
> > unmanageably large.
> >
>
> I'm using spec/lib for that, and spec/libraries for exampling code at
> RAILS_ROOT/lib

That's two for two, but it won't work if you want to use autotest.

>
> --
> Luis Lavena
> Multimedia systems
> -
> Leaders are made, they are not born. They are made by hard effort,
> which is the price which all of us must pay to achieve any goal that
> is worthwhile.
> Vince Lombardi
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list