-
-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong step definition created when having "(" #364
Comments
As of 3.0.0.pre.2, cucumber-ruby supports both Cucumber Expressions and Regular Expressions. Generated snippets use Cucumber Expressions, not Regular Expressions. I think you may have stumbled upon #333 which should have been fixed by #334, but it looks like there might still be a bug with it. This needs more investigation.... |
@christianbaumann here is a workaround for you. The generated snippet currently is: Given("the room information \(room code and availability) is correct") do
pending # Write code here that turns the phrase above into concrete actions
end Either change double quotes to single quotes: Given('the room information \(room code and availability) is correct') do
pending # Write code here that turns the phrase above into concrete actions
end Or double-escape the opening parenthesis: Given("the room information \\(room code and availability) is correct") do
pending # Write code here that turns the phrase above into concrete actions
end The bug is in cucumber-ruby, and not in cucumber-expressions. We should change the snippet generator to use single quotes rather than double quotes, and only escape single quotes in the expressions itself. |
This issue was moved to cucumber/cucumber-ruby#1291 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
I have a step definition which contains "(" and ")", eg.
Expected Behavior
When I run cucumber and have no step definition defined, I would expect a matching step definition to be defined
Current Behavior
Instead, following step definition is created:
Your Environment
cucumber (3.1.0)
cucumber-core (3.1.0)
cucumber-expressions (5.0.17, 5.0.15)
cucumber-tag_expressions (1.1.1)
cucumber-wire (0.0.1)
The text was updated successfully, but these errors were encountered: