私のキュウリのシナリオは次のとおりです。
Scenario: test add user
Given I logged in with email
When I add user with name test1 in my test
Then I should see my user
#After remove user with name test1
いくつかのサンプルステップ定義は次のとおりです。
When /^add user with name (\w+) in my test$/ do |name|
@test.add_user(name)
end
システムをクリーンに保つために、テストシナリオの終了後に追加したユーザーを削除したいと思います。アフターフックを使用してこれを達成できますか?ユーザー名をAfterフックに渡す方法が見つかりません。