[rspec-users] the Given, When, Then framework

David Chelimsky dchelimsky at gmail.com
Sat Jun 14 14:14:48 EDT 2008


On Jun 14, 2008, at 12:50 PM, aidy lewis wrote:

> Hi,
>
> Is the Given, When, Then framework, the user story, the acceptance
> criteria or both?

 From my talk at railsconf: http://en.oreilly.com/rails2008/public/schedule/detail/2055

=============================================
Story: measure progress towards registration goals
   As a conference organizer
   I want to see a report of registrations
   So that I can measure progress towards registration goals

   Scenario: one registration shows as 1%
     Given a goal of 200 registrations
     When 1 attendee registers
     Then the goal should be 1% achieved

   Scenario: one registration less than the goal shows as 99%
     Given a goal of 200 registrations
     When 199 attendees register
     Then the goal should be 99% achieved
=============================================

The story and the text before the first scenario is the User Story as  
we've always known it in XP.

The Scenarios are automated, and represent acceptance criteria.

Make sense?

Cheers,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080614/f7bc1709/attachment-0001.html>


More information about the rspec-users mailing list