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

nicholas a. evans nick at ekenosen.net
Sun May 27 17:58:58 EDT 2007

I've been putting mine directly in the RAILS_ROOT/spec directory: e.g.
spec/user_spec_helper.rb, spec/patient_spec_helper.rb.  I usually put
the require statements into spec/spec_helper.rb.

I suppose a case could be made for that being a little bit messy.
Perhaps spec/support would be my first choice.


On 5/24/07, Coda Hale <coda.hale at gmail.com> wrote:
> On 5/24/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> > I don't think this is too simplistic - as long as the nested dirs
> > align in lib and spec/lib, then the regexp matcher will include the
> > '/'es, and all will be right with the world.
> >
> > In truth, I already implemented exactly what you have there (in a
> > hurry to get a release out today), but if you file the above in the
> > tracker I'll be more than happy to add you to the contributor page.
> 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.
> Any ideas?

More information about the rspec-users mailing list