# Stories location

**URL:** <https://www.ruby-forum.com/t/stories-location/117244>\
**Category:** RSpec\
**Created:** [October 15, 2007, 8:28am UTC](https://www.ruby-forum.com/t/stories-location/117244 "2007-10-15T08:28:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://www.ruby-forum.com/u/steve)\
**Post date:** [October 15, 2007, 8:28am UTC](https://www.ruby-forum.com/t/stories-location/117244/1 "2007-10-15T08:28:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![steve](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://www.ruby-forum.com/u/steve)\
**Post date:** [October 15, 2007, 9:13am UTC](https://www.ruby-forum.com/t/stories-location/117244/2 "2007-10-15T09:13:44Z")

</div>

On 10/14/07, Steve [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> removed\_email\_address@domain.invalid  
> [http://rubyforge.org/mailman/listinfo/rspec-users](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

---

<div class="post-metadata">

**Author:** ![steve](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://www.ruby-forum.com/u/steve)\
**Post date:** [October 15, 2007, 1:14pm UTC](https://www.ruby-forum.com/t/stories-location/117244/3 "2007-10-15T13:14:52Z")

</div>

On 10/15/07, Steve [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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?

---

<div class="post-metadata">

**Author:** ![steve](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://www.ruby-forum.com/u/steve)\
**Post date:** [October 16, 2007, 9:31am UTC](https://www.ruby-forum.com/t/stories-location/117244/4 "2007-10-16T09:31:16Z")

</div>

On 10/15/07, Wincent C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![steve](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://www.ruby-forum.com/u/steve)\
**Post date:** [October 16, 2007, 9:24am UTC](https://www.ruby-forum.com/t/stories-location/117244/5 "2007-10-16T09:24:50Z")

</div>

El 15/10/2007, a las 14:21, “David C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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
