How do I implement optional argument in cucumber.
I’ve step definition
When /^I set parameter1 to (.+) and parameter2 to (.+) and parameter3 to (.+)$/ do |arg1,arg2,arg3|
which is triggered by
I set parameter1 to a,b and parameter2 to c,d and parameter3 to e,f
How can I make my step definition so it can be triggered by any one of these
I set parameter1 to a,b and parameter2 to c,d and parameter3 to e,f
I set parameter1 to a,b and parameter2 to c,d
I set parameter1 to a,b
It’s better to use tables then
Then in step definition you can iterate over table elements.