* docs(*): correct example

* docs(*): reorder step declarations
Этот коммит содержится в:
Alexandru Chitu 2023-02-21 11:52:24 +00:00 коммит произвёл GitHub
родитель 62d84eedbc
коммит 5368ee0229
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

Просмотреть файл

@ -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.Given(`^I eat (\d+)$`, iEat)
ctx.When(`^there are (\d+) godogs$`, thereAreGodogs)
ctx.Given(`^there are (\d+) godogs$`, thereAreGodogs)
ctx.When(`^I eat (\d+)$`, iEat)
ctx.Then(`^there should be (\d+) remaining$`, thereShouldBeRemaining)
}
```