Open borisbrodski opened 13 years ago
Maybe it's just a typo, but in your example, you write "doesn't" and your regex contains "don't" ...
Yes, it's a type. Sorry for that.
I would like to point out, that the problem still exists. The typo is only in the posted example.
Hi, I see you have the same issue here.
Have a look at https://github.com/cucumber/cuke4duke/pull/124 and the corresponding commit for a quick patch. You can either check it out and build from source or wait for the pull request to be accepted.
Hope it helps.
Cool! Thank you very much.
Consider following step definition: @Then("^I( don't)? see the Text \"([^"]*)\"$") public void seeOrDoesntSeeText(String dont, String text) { if (dont != null) { assertFalse(seeText(text)); } else { assertTrue(seeText(text)); } }
This step definition should work with both
In Cuke4duke this produces IndexOutOfBounds exception in StepArgument class. The problem is, that the matcher.start(1) returns -1, if "don't" not there. This causes wrong call to the StepArgument-constructor in the line