Cucumber support for the JVM: Java, Scala, Groovy, Clojure, Ioke, Javascript, Spring, Guice, PicoContainer, WebDriver, Ant and Maven
256
stars
72
forks
source link
Fixed optional capture groups in step definitions #124
Closed
bcluca closed 10 years ago
Hi,
I have resolved an issue with cuke4duke not handling optional capture groups correctly in step definitions.
You can reproduce this bug using the following step definition
along with the feature step below
Basically we get a
String index out of range
exception when the optional parameter is not provided (matching with an empty string).This patch makes the
String
parameter available and empty in this case, as expected.Unit tests are provided as well and the patch comes in a topic branch, to easily accommodate any further changes before merging.
Hope to see this pulled soon :D
Thanks, Luca Bernardo Ciddio