伙计们,
我被困在一个地方,看起来像一个语法错误,这是我的 cuke:
Feature: This is a test feature
@stagingsearch
Scenario Outline: Create a search and run it
When I create a search for profile "profilesame" for user <user>
Then I should see "Results"
Examples: These are the users
| user |
| mol_2_1 |
| mol_2_2 |
我收到错误说实施步骤:
When /^I create a search for profile "([^"]*)" for user mol_(\d+)_(\d+)$/ do |arg1, arg2, arg3|
pending # express the regexp above with the code you wish you had
end
我不明白为什么黄瓜没有将示例 mol_2_1 解析为单个字符串。这里只有 2 个参数,但 cucumber 似乎很困惑,并将其作为 3 个参数。