docs(*): correct example (#538)
* docs(*): correct example * docs(*): reorder step declarations
Этот коммит содержится в:
родитель
62d84eedbc
коммит
5368ee0229
1 изменённых файлов: 3 добавлений и 3 удалений
|
@ -158,8 +158,8 @@ func thereShouldBeRemaining(arg1 int) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func InitializeScenario(ctx *godog.ScenarioContext) {
|
func InitializeScenario(ctx *godog.ScenarioContext) {
|
||||||
ctx.Step(`^I eat (\d+)$`, iEat)
|
|
||||||
ctx.Step(`^there are (\d+) godogs$`, thereAreGodogs)
|
ctx.Step(`^there are (\d+) godogs$`, thereAreGodogs)
|
||||||
|
ctx.Step(`^I eat (\d+)$`, iEat)
|
||||||
ctx.Step(`^there should be (\d+) remaining$`, thereShouldBeRemaining)
|
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:
|
Alternatively, you can also specify the keyword (Given, When, Then...) when creating the step definitions:
|
||||||
``` go
|
``` go
|
||||||
func InitializeScenario(ctx *godog.ScenarioContext) {
|
func InitializeScenario(ctx *godog.ScenarioContext) {
|
||||||
ctx.Given(`^I eat (\d+)$`, iEat)
|
ctx.Given(`^there are (\d+) godogs$`, thereAreGodogs)
|
||||||
ctx.When(`^there are (\d+) godogs$`, thereAreGodogs)
|
ctx.When(`^I eat (\d+)$`, iEat)
|
||||||
ctx.Then(`^there should be (\d+) remaining$`, thereShouldBeRemaining)
|
ctx.Then(`^there should be (\d+) remaining$`, thereShouldBeRemaining)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче