You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered this by accident, having a scenario called Buttons don't appear, which begins with the keyword But. It looks like all keywords at the start of scenario names cause the parser to fail (on step generation or feature execution). For example:
Feature: WibbleScenario: Given a lot of moneyGiven I am an example
When I do example things
Then I should work
$ ./bin/spinach -g features/wibble.feature
Traceback (most recent call last):
13: from ./bin/spinach:3:in `<main>'
12: from ./bin/spinach:3:in `load'
11: from /usr/src/app/vendor/bundle/ruby/2.5.0/gems/spinach-0.10.1/bin/spinach:15:in `<top (required)>'
10: from /usr/src/app/vendor/bundle/ruby/2.5.0/gems/spinach-0.10.1/lib/spinach/cli.rb:30:in `run'
9: from /usr/src/app/vendor/bundle/ruby/2.5.0/gems/spinach-0.10.1/lib/spinach/runner.rb:61:in `run'
8: from /usr/src/app/vendor/bundle/ruby/2.5.0/gems/spinach-0.10.1/lib/spinach/runner.rb:61:in `map'
7: from /usr/src/app/vendor/bundle/ruby/2.5.0/gems/spinach-0.10.1/lib/spinach/runner.rb:65:in `block in run'
6: from /usr/src/app/vendor/bundle/ruby/2.5.0/gems/spinach-0.10.1/lib/spinach/parser.rb:39:in `parse'
5: from /usr/src/app/vendor/bundle/ruby/2.5.0/gems/gherkin-ruby-0.3.2/lib/gherkin_ruby.rb:8:in `parse'
4: from gherkin.y:107:in `parse'
3: from /usr/src/app/vendor/bundle/ruby/2.5.0/gems/gherkin-ruby-0.3.2/lib/gherkin_ruby/parser/lexer.rb:31:in `scan_str'
2: from /usr/local/lib/ruby/2.5.0/racc/parser.rb:259:in `do_parse'
1: from /usr/local/lib/ruby/2.5.0/racc/parser.rb:259:in `_racc_do_parse_c'
/usr/local/lib/ruby/2.5.0/racc/parser.rb:528:in `on_error': (Racc::ParseError)
parse error on value "Given" (GIVEN)
It's easily worked around by renaming the scenario but I thought I'd report it in case it's not a known issue.
The text was updated successfully, but these errors were encountered:
[Please move this to gherkin-ruby if you prefer]
I discovered this by accident, having a scenario called
Buttons don't appear
, which begins with the keywordBut
. It looks like all keywords at the start of scenario names cause the parser to fail (on step generation or feature execution). For example:It's easily worked around by renaming the scenario but I thought I'd report it in case it's not a known issue.
The text was updated successfully, but these errors were encountered: