Hi,
I have a scenario outline I'm trying to write where I want to pass an
array
as one of the parameters as follows -
Scenario Outline:
When I search for all <search_terms>
Then I should get a list of recipes
And the list of recipes should contain a recipe with the title
<recipe_title>
Examples:
| search_terms | recipe_title |
| "[ 'chocolate' , 'Nigella Lawson']" | "White chocolate and mint
mousse" |
but cucumber does'nt seem to parse it correctly ( or rather, as I
want ).
My knowledge of ruby is not that deep, so it maybe that I might be
missing
something to do with the way parameters are parsed.
1. Is there something I am missing re: the above example?
2. Is there way of rewriting the scenario to cope with params of
undefined
length so that I don't have to do the above?
I did think about the following, using the first two clauses to build
the query and issuing the request in the Then step. But that strikes
me as a bit clunky.
When I search for <searchterm>
And <searchterm2>
Then...
Thanks
mark