Details
Description
I experienced some trouble especially with @Then steps ending with punctation characters:
Given I do this When I do that Then I expect to see the message Hello World.
will require a step definition like
@Then("I expect to see the message $message.")
Mind that you must not forget the period at the end of the step definition... otherwise message will be Hello World. rathen than Hello World.
This is a quite common mistake and in addition it prevents the step definition to be reusable here:
Given I do this When I do that Then I expect to see the message Hello World And the world echoes Hello John.
where it is required to have an Alias just because of the period. Or, as alternative, the assertions inside need to deal with the period at the end.
It would be nice if JBehave could ignore this period although it is not quite clear to me how to handle scenarios where the period needs to be parsed. And of course such a change might break existing tests.
Activity
Mauro Talevi
made changes -
Field | Original Value | New Value |
---|---|---|
Assignee | Mauro Talevi [ maurotalevi ] | |
Fix Version/s | 3.5.3 [ 18047 ] | |
Fix Version/s | 3.6 [ 17721 ] | |
Priority | Major [ 3 ] | Minor [ 4 ] |
Mauro Talevi
made changes -
Fix Version/s | 3.5.3 [ 18047 ] |
Mauro Talevi
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
We could make the ignoring of the period configurable in the RegexStoryParser and it would be down to the user to configure it.