标签云

微信群

扫码加入我们

WeChat QR Code

With reference to a previous question/answer In a method that take multiple optional parameters, how can any but the first be specified?def foo(fruit=nil,cut=nil,topping=nil)fruit||= 'apple'cut||= 'sliced'topping||= 'ice cream'# some logic hereendfoo(nil,nil,'hot fudge')How can I wrap this example into a single cucumber step definition where multiple parameters are also optional i.e. So I can pass any number of parameters into the step?Like these,I enter cut 'sliced' and topping 'Ice cream'. I enter fruit 'apple and topping 'Ice cream'.I enter cut 'sliced'I want to replicate the user only supplying certain values as the page already has default values in the fields.Thanks