Как повторно использовать определение шага Cucumber с таблицей для последнего параметра?

Этот код:

Then %{I should see the following data in the "Feeds" data grid:
                                                   |   Name   |
                                                   | #{name}  |}

И этот:

Then "I should see the following data in the \"Feeds\" data grid:
|   Name   |
| #{name}  |"

И этот:

  Then "I should see the following data in the \"Feeds\" data grid:\n|   Name   |\n| #{name}  |"

И даже этот:

Then <<EOS
I should see the following data in the "Feeds" data grid:
|   Name   |
| #{name}  |
EOS

Дает мне:

Your block takes 2 arguments, but the Regexp matched 1 argument.
(Cucumber::ArityMismatchError)
  tests/endtoend/step_definitions/instruments_editor_steps.rb:29:in `/^the editor shows "([^"]*)" in the feeds list$/'
  melomel-0.6.0/lib/melomel/cucumber/data_grid_steps.rb:59:in `/^I should see the following data in the "([^"]*)" data grid:$/'
  tests/endtoend/instruments_editor.feature:11:in `And the editor shows "myFeed" in the feeds list

Этот:

Then "I should see the following data in the \"Feeds\" data grid: |   Name   || #{name}  |"

И этот:

Then "I should see the following data in the \"Feeds\" data grid:|   Name   || #{name}  |"

Дает:

Undefined step: "I should see the following data in the "Feeds" data grid:|   Name   || myFeed  |" (Cucumber::Undefined)
  ./tests/endtoend/step_definitions/instruments_editor_steps.rb:31:in `/^the editor shows "([^"]*)" in the feeds list$/'
  tests/endtoend/instruments_editor.feature:11:in `And the editor shows "myFeed" in the feeds list'
7
задан Brian Tompsett - 汤莱恩 13 June 2017 в 20:40
поделиться