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

Mark Wilden mark at mwilden.com
Mon Apr 6 12:36:50 EDT 2009

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

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?


More information about the rspec-users mailing list