RubyonRailsを使用して開発しているアプリケーションに次の表があります。
テーブルからユーザーを選択して削除または編集するキュウリでテストを作成したいと思います。
そのためのステップ定義が何であるかわかりません。
私は次のようなことができるようになりたいです:
Feature: User Manegement
In order to manage users
As an admin
I want to see a users list and change user properties
Background:
Given the following activated users exists
| name | email |
| Alice Hunter | alice.hunter@example.com |
| Bob Hunter | bob.hunter@example.com |
And the following user records
| name | email |
| Jonh Doe | jonh.doe@example.com |
Scenario: I delete a user from the table
Given I am logged in as admin
When I follow "Administration"
And I follow "User Management"
And I delete "Alice Hunter"
Then I should not see "Alice Hunter"`
誰か助けてもらえますか?ありがとうございました。
@brad
返されたエラー:
wrong number of arguments (2 for 1) (ArgumentError)
./features/step_definitions/table_steps.rb:26:in `within'
./features/step_definitions/table_steps.rb:26:in `/^I delete "(.*)"$/'