[rspec-users] Cucumber, more examples, tabular data input sets

Ashley Moran ashley.moran at patchspace.co.uk
Sat Oct 18 17:42:01 EDT 2008


On Oct 18, 2008, at 9:51 pm, Zach Dennis wrote:

> Given I login as Joe without the 'admin' privilege
> When I GET /admin
> Then I am notified that access was denied
>
> More Examples:
> | name | privilege | request_method | path        | name |
> | Joe  | admin     | POST           | /invoices   | Joe  |
> | Joe  | admin     | PUT            | /invoices/1 | Joe  |

How about just annotating them? eg

   Given I login as [name] Joe without the 'admin' privilege  
[missing_privilege]
   When I GET [request_method] /admin [path]
   Then I am notified that access was denied

Or whatever.  Maybe do it selectively, I don't think all of them are  
necessary.

Maybe writing scenarios that read well above a table is just a skill  
we have to develop.

Just a few thoughts really, I'm thinking out loud.

Ashley

-- 
http://www.patchspace.co.uk/
http://aviewfromafar.net/



More information about the rspec-users mailing list