[rspec-users] Specs versus Stories
dchelimsky at gmail.com
Mon Feb 18 18:44:59 EST 2008
On Feb 18, 2008 6:38 PM, Victor Asteinza <vic at civrot.org> wrote:
> Isn't there redundancy between what is in your stories and your specs?
> Or are your stories at a higher level and the specs are at a lower
> level? That would make more sense to me. There would be some cross
> over. but the specs expand on what is in the stories....
While either tool can technically support either mode of thinking:
Stories are aimed at describing the behaviour of your applications.
Specs are aimed at describing the behaviour of the objects in your applications.
You are correct that there will likely be some cross over, but keep in
mind that there are different audiences and different processes.
The steps in stories (the descriptive text, not the implementation of
the steps) are typically written in entirety before setting out to
develop a body of work. Stories should be run before a commit, or as
part of a CI build, but are not always run between every step.
The examples in specs, on the other hand, typically come into
existence in a very granular red-green-refactor cycle, and should be
run between every step.
> > Message: 3
> > Date: Mon, 18 Feb 2008 11:21:47 -0500
> > From: "Andrew WC Brown" <omen.king at gmail.com>
> > Subject: Re: [rspec-users] Specs versus Stories
> > To: rspec-users <rspec-users at rubyforge.org>
> > Message-ID:
> > <ef1d468f0802180821v42276d2fw96b0041a497a2664 at mail.gmail.com>
> > Content-Type: text/plain; charset="iso-8859-1"
> > My workflow is the following:
> > Stories->Spec Views->Spec Controllers-Spec Models
> > I'll write a few stories of what I think should it happen.
> > Then I'll write my specs of what should show (and also do some
> > static html
> > page mockups)
> > Then I'll spec my controllers and models
> > I'll go back to my stories to see if they need adjusting because my
> > perceptive of how the app changed
> > Then I run my stories and make them pass.
> > Then I write a few stories and repeat.
> > I constantly step move back and forth.
> > I think Stories and BDD greatly assists you to shape your idea.
> > Write stories for what you can think of and then move on to specing.
> > You don't need complete stories you can also go back and fill them
> > in later.
> > On Feb 18, 2008 2:57 AM, Victor Asteinza <vic at civrot.org> wrote:
> >> I am new to BDD and have been doing some reading and playing with
> >> rSpec. I am a little confused. I am not sure what the best practice
> >> for using stories and specs. Should I be writing stories first, then
> >> specs that would fulfill those stories, and then write the
> >> implementation code to have everything pass? At first that seems a
> >> little redundant.
> >> I understand that the stories let you write the behavior in plane
> >> English, which I can see it being useful when dealing with non
> >> technical users. But if I am developing an internal app I am
> >> struggling with whether I should develop the stories first and then
> >> move on to the specs.
> >> Opinions? Experiences?
> >> Thanks,
> >> Victor
> >> _______________________________________________
> >> rspec-users mailing list
> >> rspec-users at rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/rspec-users
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users