[rspec-users] Stories location

David Chelimsky dchelimsky at gmail.com
Mon Oct 15 10:28:06 EDT 2007


On 10/15/07, Wincent Colaiuta <win at wincent.com> wrote:
> El 15/10/2007, a las 14:21, "David Chelimsky" <dchelimsky at gmail.com>
> escribió:
>
> > On 10/15/07, Steve <vertebrate at gmail.com> wrote:
> >> Should the stories dir be located on the project root? I was
> >> expecting to
> >> find it located under spec/ but there isn't anything there, just the
> >> stories dir off of /.
> >
> > We want stories and specs to be parallel as they are not intended to
> > be run together (they serve very different purposes). We talked about
> > doing this:
> >
> > behaviour/examples
> > behaviour/stories
> >
> > The problem with that approach is this:
> >
> > behaviour/examples/views/people/index.html.erb_spec.rb
> >
> > Just a bit too long for our taste. So we decided to keep things at the
> > project root.
>
> I actually quite like that proposal, despite the length, because it
> groups together all the RSpec stuff in one place, while still
> maintaining a separation between the two main parts (the specs and
> the stories).
>
> But I do think "behaviour/specs" is a better choice than "behaviour/
> examples" because "specs" seems to have more currency out there; I
> think "specs" is much more closely related with RSpec in people's
> minds than "examples". Say "specs" and people think "RSpec", but say
> "examples" and they could think any number of things.
>
> One alternative: "rspec/examples" (or "rspec/specs") and "rspec/
> stories". Saves about 4 characters if you're worried about length,
> and also provides some "advertising" for RSpec. I remember when I
> first started using RSpec it struck me as odd that the specs were
> stored in a folder called "spec" rather than "rspec" or "specs".
>
> > Seeing as stories go in ROOT/stories, perhaps specs should go in
> > ROOT/specs instead of ROOT/spec.
>
> Well, you could make that change, but it's probably not all that
> important. I certainly wouldn't oppose it.

Thanks for the feedback.

The reason I like specs is because it aligns w/ the pluralization of
stories. Also, it's not a system specification, it's a directory
filled with object specifications.

However we do any of this, we should make it configurable so that even
if the default is specs/stories in the project root folder, you can
easily choose to put them wherever you like and rake, spec and
autotest all work as expected.

Cheers,
David


>
> Wincent
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list