Skip to content

Commit

Permalink
docs(*): reorder step declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
otrava7 committed Feb 17, 2023
1 parent 8677a24 commit 17918fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -158,17 +158,17 @@ 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)
}
```

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)
}
```
Expand Down

0 comments on commit 17918fb

Please sign in to comment.