[rspec-users] [Cucumber] Options in tables
Kero van Gelder
kero at chello.nl
Wed Apr 22 14:08:40 EDT 2009
> In Cucumber I want to remove duplication from my examples tables.
> see http://gist.github.com/99516 for an example of the type of situation I
> am facing.
> I would like the second example to be equivalent to the first.
> To do this... I need cucumber to read a row in the examples and notice the
> 'options', then run it as if it were several rows in the table, one for each
> possible combination of options.
> Anyone else find this useful? .. or got any suggestions for better ways of
> doing it?
1) See another current thread in this list: [Cucumber] Tables
2) [new|expired] does not matter, so you don't need the column at all
you can put two checks in the step definition, I think.
perhaps this allows you to write the remaining steps in another way,
without duplication of steps.
How can I change the world if I can't even change myself?
-- Faithless, Salva Mea
More information about the rspec-users