Stories location

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 /. Also there don’t appear to be any rake tasks for
stories, nor generators. Should there be any?

Thanks,
Steve

On 10/14/07, Steve [email protected] wrote:

[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

In Rails, there’s a stories folder under the project root. If you
don’t have it, you can run script/generate rspec to generate the
folder and helper files. The TextMate bundle has a Story snippet.

Pat

On 10/15/07, Steve [email protected] 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.

Seeing as stories go in ROOT/stories, perhaps specs should go in
ROOT/specs instead of ROOT/spec.

Thoughts?

On 10/15/07, Wincent C. [email protected] wrote:

doing this:

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

El 15/10/2007, a las 14:21, “David C.” [email protected]
escribió:

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.

Wincent