From 17918fb932e29e29a48c78842bf9d7f3dd3b52df Mon Sep 17 00:00:00 2001 From: otrava7 Date: Fri, 17 Feb 2023 16:20:40 +0000 Subject: [PATCH] docs(*): reorder step declarations --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d076ad6..27f02d95 100644 --- a/README.md +++ b/README.md @@ -158,8 +158,8 @@ func thereShouldBeRemaining(arg1 int) error { } func InitializeScenario(ctx *godog.ScenarioContext) { - ctx.Step(`^I eat (\d+)$`, iEat) ctx.Step(`^there are (\d+) godogs$`, thereAreGodogs) + ctx.Step(`^I eat (\d+)$`, iEat) ctx.Step(`^there should be (\d+) remaining$`, thereShouldBeRemaining) } ``` @@ -167,8 +167,8 @@ func InitializeScenario(ctx *godog.ScenarioContext) { Alternatively, you can also specify the keyword (Given, When, Then...) when creating the step definitions: ``` go func InitializeScenario(ctx *godog.ScenarioContext) { - ctx.When(`^I eat (\d+)$`, iEat) ctx.Given(`^there are (\d+) godogs$`, thereAreGodogs) + ctx.When(`^I eat (\d+)$`, iEat) ctx.Then(`^there should be (\d+) remaining$`, thereShouldBeRemaining) } ```