Being the author of Cucumber, some of you might be surprised that I ask
How should I go about to implement a Cucumber feature and step
with the following data?
http://gist.github.com/99220 (just look at the first file for now)
Imagine I’m opening a restaurant where customers are asked for their
religion. Based on what they answer, they will be presented with a
menu. (Apologies in advance if I’m ignorant about what different people
In Cucumber, there are several ways to put this table in a feature. It
be part of a table in a Scenario Outline’s Examples section (
http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines), or it
be sent to a Step as a multiline argument (
In either case, I’m not happy about the feature and step definitions I
up with. The Scenario Outline version has annoying duplication. I have
duplicate each meat 3 times! This makes it hard to read and edit. The
multiline step argument version isn’t much better. If a menu for a
is wrong I’ll only get one error, the error won’t tell me what’s wrong
(unless I explicitly craft my error messages in the step definition) and
one failure will show (there is only one scenario).
There should be a better way to express this kind of tests. But I’m not
how. Is there a smarter way with the current Cucumber? If not, how would
like to express this sort of problem?