[rspec-users] newbq: Organizing your stories

Zach Dennis zach.dennis at gmail.com
Fri Apr 11 00:16:54 EDT 2008

On Thu, Apr 10, 2008 at 8:46 PM, Tim Haines <tmhaines at gmail.com> wrote:

> Hi,
> I'm a little unhappy with how my stories are organised, and am wondering
> if anyone has found any particular method nicest.  I'm working within an
> admin namespace, and currently have a plain text story file for each
> controller in the admin folder.  I also have a steps subfolder, with one
> step file per controller.
> I'm thinking it would be nicer to add a little more granularity here, and
> to break the plain text story files down further into "actions" on each
> controller so there's fewer stories per story file.  This could be done
> either in the one folder, or by adding a bunch of subfolders.
> I figure this is pretty common though, and that there will be one or two
> approaches that have evolved to work pretty well?

I organize my stories based on related behavior usually as defined by the
customer. For example:

 - stories/
    - projects/
      - a_user_creating_a_project_story
      - a_project_manager_adding_users_to_a_project_story
    - admin/
      - an_admin_removing_users_story

I use stories as system level integration tests, so they usually cover a
broader scope than a controller/action.

Zach Dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080411/d2f1f77d/attachment.html 

More information about the rspec-users mailing list