Cra*_*gan 28 ruby ruby-on-rails cucumber gherkin
在谷歌搜索此错误消息没有运气
features/manage_hand_evaluator.feature:features/manage_hand_evaluator.feature中的解析错误:21.在期待以下之一时找到示例:comment,py_string,row,scenario,scenario_outline,step,tag.(现状:步骤).(小黄瓜::分析器:: ParseError)
这是我为示例部分设置的(此时没有其他方案,只是在"功能:"部分之后的这个方案)
...
Scenario: Evaluating for current straights
Given I am a player with <hand>
When the board is <board>
Then the current possible straights should be <possibles>
Examples:
| board | hand | possibles |
| A23 | 45 | A2345 |
| 3456 | 23 | A2345,23456,34567,45678 |
| 789T | A2 | 56789,6789T,789TJ,89TJQ |
| 45678 | 23 | 23456,34567,45678,56789,6789T |
Run Code Online (Sandbox Code Playgroud)
我也已经为那些"Given,When,Then"行设置了步骤定义(当我替换时测试通过,并且有一些文本并注释掉"Examples"部分).所以似乎步骤定义设置得恰当,只是因为我在.feature文件中的内容存在某种解析问题,我无法弄清楚我做错了什么.
相关的宝石安装:小黄瓜(2.1.5)(尝试2.2.0,但它与我的黄瓜版本打破)黄瓜(0.8.5)黄瓜 - 铁路(0.3.2)导轨(2.3.8)
Ali*_*irH 66
更换
Scenario:
Run Code Online (Sandbox Code Playgroud)
同
Scenario Outline:
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8614 次 |
| 最近记录: |