diff --git a/features/snippets.feature b/features/snippets.feature index 2188c55..4e7a6a7 100644 --- a/features/snippets.feature +++ b/features/snippets.feature @@ -24,8 +24,10 @@ Feature: undefined step snippets // --- - func iSendRequestTo(arg1, arg2 string) { } - func theResponseCodeShouldBe(arg1 int) { } + func iSendRequestTo(arg1, arg2 string) { + } + func theResponseCodeShouldBe(arg1 int) { + } ctx.Step(`^I send "([^"]*)" request to "([^"]*)"$`, iSendRequestTo) ctx.Step(`^the response code should be (\d+)$`, theResponseCodeShouldBe) @@ -53,9 +55,12 @@ Feature: undefined step snippets // --- - func iSendRequestToWith(arg1, arg2 string, arg3 *godog.Table) { } - func theResponseCodeShouldBeAndHeaderShouldBe(arg1 int, arg2, arg3 string) { } - func theResponseBodyShouldBe(arg1 *godog.DocString) { } + func iSendRequestToWith(arg1, arg2 string, arg3 *godog.Table) { + } + func theResponseCodeShouldBeAndHeaderShouldBe(arg1 int, arg2, arg3 string) { + } + func theResponseBodyShouldBe(arg1 *godog.DocString) { + } ctx.Step(`^I send "([^"]*)" request to "([^"]*)" with:$`, iSendRequestToWith) ctx.Step(`^the response code should be (\d+) and header "([^"]*)" should be "([^"]*)"$`, theResponseCodeShouldBeAndHeaderShouldBe) @@ -83,8 +88,10 @@ Feature: undefined step snippets // --- - func iPullFromGithubcom() { } - func theProjectShouldBeThere() { } + func iPullFromGithubcom() { + } + func theProjectShouldBeThere() { + } ctx.Step(`^I pull from github\.com$`, iPullFromGithubcom) ctx.Step(`^the project should be there$`, theProjectShouldBeThere) @@ -106,8 +113,10 @@ Feature: undefined step snippets // --- - func thereIsAWhichCosts(arg1 string, arg2 int) { } - func iAddTheToTheBasket(arg1 string) { } + func thereIsAWhichCosts(arg1 string, arg2 int) { + } + func iAddTheToTheBasket(arg1 string) { + } ctx.Step(`^there is a "([^"]*)", which costs £(\d+)$`, thereIsAWhichCosts) ctx.Step(`^I add the "([^"]*)" to the basket$`, iAddTheToTheBasket) @@ -129,8 +138,10 @@ Feature: undefined step snippets // --- - func whichCosts(arg1 string, arg2 int) { } - func godogs(arg1 int) { } + func whichCosts(arg1 string, arg2 int) { + } + func godogs(arg1 int) { + } ctx.Step(`^"([^"]*)", which costs £(\d+)$`, whichCosts) ctx.Step(`^(\d+) godogs$`, godogs) @@ -164,9 +175,12 @@ Feature: undefined step snippets // --- - func чтото() { } - func яДелаюЕщёЧтотоParam(param1 string, arg1, arg2 int, param2, параметр3, arg3, data string) { } - func получаетсяЕщёБолееЧтото() { } + func чтото() { + } + func яДелаюЕщёЧтотоParam(param1 string, arg1, arg2 int, param2, параметр3, arg3, data string) { + } + func получаетсяЕщёБолееЧтото() { + } ctx.Step(`^что-то$`, чтото) ctx.Step(`^я делаю ещё что-то "([^"]*)", (\d+), (\d+), param="([^"]*)", "([^"]*)", "([^"]*)", "([^"]*)"$`, яДелаюЕщёЧтотоParam) diff --git a/internal/formatters/undefined_snippets_gen.go b/internal/formatters/undefined_snippets_gen.go index c3ea9d9..58b29a8 100644 --- a/internal/formatters/undefined_snippets_gen.go +++ b/internal/formatters/undefined_snippets_gen.go @@ -28,7 +28,8 @@ var undefinedSnippetsTpl = template.Must(template.New("snippets").Funcs(snippetH // --- -{{ range . }}func {{ .Method }}({{ .Args }}) { } +{{ range . }}func {{ .Method }}({{ .Args }}) { +} {{end}}{{ range . }} ctx.Step({{ backticked .Expr }}, {{ .Method }}){{end}} `))