[rspec-users] DRYing up stories

Andrew WC Brown omen.king at gmail.com
Wed Jan 23 16:47:33 EST 2008


Do all of these scenarios exist in the same story?
Should they be dried up?
Would Clarity over Cleverness apply here?

On Jan 23, 2008 4:45 PM, Neil M. Young <ermok at tiscali.co.uk> wrote:

>
> I'm finding that I'm writing sets of very similar scenarios to check
> access
> permissions for each of my actions. Does anyone have suggestions on how to
> dry this up:
>
> Given an existing Account
> And a logged in Admin
> When the user visits account/manage
> Then he should get access
>
> Given an existing Account
> And a logged in Manager
> When the user visits account/manage
> Then he should get access
>
> Given an existing Account
> And a logged in Supervisor
> When the user visits account/manage
> Then he should not get access
>
> Given an existing Account
> And a logged in Reviewer
> When the user visits account/manage
> Then he should not get access
>
> Given an existing Account
> And a logged in User
> When the user visits account/manage
> Then he should not get access
>
> --
> View this message in context:
> http://www.nabble.com/DRYing-up-stories-tp15053384p15053384.html
> Sent from the rspec-users mailing list archive at Nabble.com.
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080123/19f79cb3/attachment.html 


More information about the rspec-users mailing list