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

Zach Dennis zach.dennis at gmail.com
Sat Oct 18 20:48:42 EDT 2008


On Sat, Oct 18, 2008 at 5:42 PM, Ashley Moran
<ashley.moran at patchspace.co.uk> wrote:
>
> 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.
>

I like what you're thinking,

-- 
Zach Dennis
http://www.continuousthinking.com
http://www.mutuallyhuman.com


More information about the rspec-users mailing list