[rspec-users] workflow: user => stories/features => spec => code => user

Scott Taylor mailing_lists at railsnewbie.com
Fri Sep 19 04:44:48 EDT 2008

On Sep 19, 2008, at 4:09 AM, Jarkko Laine wrote:

> On 19.9.2008, at 10.58, Matt Wynne wrote:
>> On 19 Sep 2008, at 02:00, DyingToLearn wrote:
>>> Hi,
>>> I am still trying to learn how to effectively use BDD. I would  
>>> like to
>>> know if there is a typical BDD workflow or if it is really just a
>>> question of personal preference.
>>> So far I see the following steps being fairly common:
>>> 1. talk with user to establish a few stories and features
>>> 2. write plaintext stories or cucumber features (with the user?)
>>> 3. write specs for whatever step needs to be wnitten
>>> 4. code until specs pass
>>> 5. write story/feature steps
>>> 6. repeat steps 3-5 until the story/feature passes
>>> 7. show the user to confirm that it works the way the user want (and
>>> go back to step 2 if it doesn't)
>>> 8. go back to step 1 for new stories/features
>> This seems to be pretty much the workflow that's evolving for us,  
>> though I tend to write the step implementations before I start  
>> coding the views, controller, models. (i.e. 5 before 3)/
> Ditto, and also, don't write all the specs at a time. My plan for  
> 3-5 is something like this:
> 3. Write the first step of the feature in question
> 4. Write the view spec to satisfy the step code
> 5. Write the view functionality to make 4 pass
> 6. Write the controller spec to satisfy the needs of 4
> 7. Write the code to make 6 pass
> 8. Write the model spec to satisfy the needs of 6
> 9. Write the code to make 8 pass
> At this point the step should pass, so go back to 3 and repeat with  
> the next step.
> Note that I left out the refactoring part of the TDD cycle here. It  
> generally happens between every layer after the specs pass.

As far as I can remember, this is how Pat introduced described his  
cycle in the screencast he posted on the story runner when it first  
came out.  I'd be curious to see if (and how) he has changed his  
workflow since then.


More information about the rspec-users mailing list