[rspec-users] Best practices: How small to make > examples?

Zach Dennis zach.dennis at gmail.com
Mon Apr 6 18:59:04 EDT 2009

On Mon, Apr 6, 2009 at 12:36 PM, Mark Wilden <mark at mwilden.com> wrote:
> On Mon, Apr 6, 2009 at 8:02 AM, James B. Byrne <byrnejb at harte-lyne.ca> wrote:
>>  Given user "myuser" is authenticated
>>  When they visit the registration page
>>   And they provide all required registration data
>>   And they choose "register"
>>  Then they should see a registration success message

You left out the "And..." which I believe James used to denote
anything else that needed to be done to ensure the registration was
successful. Maybe on purpose, maybe by accident, but it seems to have
impacted your response. Maybe what you responded with was exactly what
you meant to say, but it feels like a response made with haste.

> I have two issues with this:
> 1) How could this story be "acceptable"? In other words, how could
> business say that it's done? The success of this scenario would not
> indicate very much about the success of the application.
> 2) There are different levels of granularity here. There are very
> specific steps ('they visit the registration page', 'they should see a
> registration success message') that relate to a specific URL or page
> element. Then there is the catch-all 'all required registration data.'
> To me, this doesn't communicate anything meaningful to business. It's
> akin to 'Then it should work'.
> Obviously, a scenario is not a formal requirements document.
> Nevertheless, if what it asserts is too generic, how much benefit is
> there in executing it?
> ///ark
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

Zach Dennis

More information about the rspec-users mailing list