diff --git a/features/formatter/pretty.feature b/features/formatter/pretty.feature
index 7b307be..c927f4d 100644
--- a/features/formatter/pretty.feature
+++ b/features/formatter/pretty.feature
@@ -295,12 +295,10 @@ Feature: pretty formatter
You can implement step definitions for undefined steps with these snippets:
- func undefinedDocString(arg1 *godog.DocString) error {
- return godog.ErrPending
+ func undefinedDocString(arg1 *godog.DocString) {
}
- func undefinedTable(arg1 *godog.Table) error {
- return godog.ErrPending
+ func undefinedTable(arg1 *godog.Table) {
}
func InitializeScenario(ctx *godog.ScenarioContext) {
diff --git a/features/snippets.feature b/features/snippets.feature
index 2e3f39e..2c5341c 100644
--- a/features/snippets.feature
+++ b/features/snippets.feature
@@ -20,12 +20,10 @@ Feature: undefined step snippets
"""
And the undefined step snippets should be:
"""
- func iSendRequestTo(arg1, arg2 string) error {
- return godog.ErrPending
+ func iSendRequestTo(arg1, arg2 string) {
}
- func theResponseCodeShouldBe(arg1 int) error {
- return godog.ErrPending
+ func theResponseCodeShouldBe(arg1 int) {
}
func InitializeScenario(ctx *godog.ScenarioContext) {
@@ -52,16 +50,13 @@ Feature: undefined step snippets
When I run feature suite
Then the undefined step snippets should be:
"""
- func iSendRequestToWith(arg1, arg2 string, arg3 *godog.Table) error {
- return godog.ErrPending
+ func iSendRequestToWith(arg1, arg2 string, arg3 *godog.Table) {
}
- func theResponseBodyShouldBe(arg1 *godog.DocString) error {
- return godog.ErrPending
+ func theResponseBodyShouldBe(arg1 *godog.DocString) {
}
- func theResponseCodeShouldBeAndHeaderShouldBe(arg1 int, arg2, arg3 string) error {
- return godog.ErrPending
+ func theResponseCodeShouldBeAndHeaderShouldBe(arg1 int, arg2, arg3 string) {
}
func InitializeScenario(ctx *godog.ScenarioContext) {
@@ -88,12 +83,10 @@ Feature: undefined step snippets
"""
And the undefined step snippets should be:
"""
- func iPullFromGithubcom() error {
- return godog.ErrPending
+ func iPullFromGithubcom() {
}
- func theProjectShouldBeThere() error {
- return godog.ErrPending
+ func theProjectShouldBeThere() {
}
func InitializeScenario(ctx *godog.ScenarioContext) {
@@ -114,12 +107,10 @@ Feature: undefined step snippets
When I run feature suite
And the undefined step snippets should be:
"""
- func iAddTheToTheBasket(arg1 string) error {
- return godog.ErrPending
+ func iAddTheToTheBasket(arg1 string) {
}
- func thereIsAWhichCosts(arg1 string, arg2 int) error {
- return godog.ErrPending
+ func thereIsAWhichCosts(arg1 string, arg2 int) {
}
func InitializeScenario(ctx *godog.ScenarioContext) {
@@ -140,12 +131,10 @@ Feature: undefined step snippets
When I run feature suite
And the undefined step snippets should be:
"""
- func godogs(arg1 int) error {
- return godog.ErrPending
+ func godogs(arg1 int) {
}
- func whichCosts(arg1 string, arg2 int) error {
- return godog.ErrPending
+ func whichCosts(arg1 string, arg2 int) {
}
func InitializeScenario(ctx *godog.ScenarioContext) {
@@ -175,16 +164,13 @@ Feature: undefined step snippets
"""
And the undefined step snippets should be:
"""
- func получаетсяЕщёБолееЧтото() error {
- return godog.ErrPending
+ func получаетсяЕщёБолееЧтото() {
}
- func чтото() error {
- return godog.ErrPending
+ func чтото() {
}
- func яДелаюЕщёЧтото() error {
- return godog.ErrPending
+ func яДелаюЕщёЧтото() {
}
func InitializeScenario(ctx *godog.ScenarioContext) {
diff --git a/internal/formatters/fmt_base.go b/internal/formatters/fmt_base.go
index b7e5394..85c813b 100644
--- a/internal/formatters/fmt_base.go
+++ b/internal/formatters/fmt_base.go
@@ -229,6 +229,7 @@ func (f *Base) Snippets() string {
w = strings.Title(w)
case len(w) > 0:
r := []rune(w)
+ // tut
w = string(unicode.ToLower(r[0])) + string(r[1:])
}
words = append(words, w)
diff --git a/internal/formatters/formatter-tests/events/some_scenarions_including_failing b/internal/formatters/formatter-tests/events/some_scenarions_including_failing
index 53606be..698d972 100644
--- a/internal/formatters/formatter-tests/events/some_scenarions_including_failing
+++ b/internal/formatters/formatter-tests/events/some_scenarions_including_failing
@@ -26,4 +26,4 @@
{"event":"TestStepStarted","location":"formatter-tests/features/some_scenarions_including_failing.feature:14","timestamp":-6795364578871}
{"event":"TestStepFinished","location":"formatter-tests/features/some_scenarions_including_failing.feature:14","timestamp":-6795364578871,"status":"skipped"}
{"event":"TestCaseFinished","location":"formatter-tests/features/some_scenarions_including_failing.feature:12","timestamp":-6795364578871,"status":"undefined"}
-{"event":"TestRunFinished","status":"failed","timestamp":-6795364578871,"snippets":"You can implement step definitions for undefined steps with these snippets:\n\nfunc undefined() error {\n\treturn godog.ErrPending\n}\n\nfunc InitializeScenario(ctx *godog.ScenarioContext) {\n\tctx.Step(`^undefined$`, undefined)\n}\n","memory":""}
+{"event":"TestRunFinished","status":"failed","timestamp":-6795364578871,"snippets":"You can implement step definitions for undefined steps with these snippets:\n\nfunc undefined() {\n}\n\nfunc InitializeScenario(ctx *godog.ScenarioContext) {\n\tctx.Step(`^undefined$`, undefined)\n}\n","memory":""}
diff --git a/internal/formatters/formatter-tests/junit,pretty/some_scenarions_including_failing b/internal/formatters/formatter-tests/junit,pretty/some_scenarions_including_failing
index 4567095..845991d 100644
--- a/internal/formatters/formatter-tests/junit,pretty/some_scenarions_including_failing
+++ b/internal/formatters/formatter-tests/junit,pretty/some_scenarions_including_failing
@@ -44,8 +44,7 @@
You can implement step definitions for undefined steps with these snippets:
-func undefined() error {
- return godog.ErrPending
+func undefined() {
}
func InitializeScenario(ctx *godog.ScenarioContext) {
diff --git a/internal/formatters/formatter-tests/pretty/some_scenarions_including_failing b/internal/formatters/formatter-tests/pretty/some_scenarions_including_failing
index 016f09a..0a516f4 100644
--- a/internal/formatters/formatter-tests/pretty/some_scenarions_including_failing
+++ b/internal/formatters/formatter-tests/pretty/some_scenarions_including_failing
@@ -28,8 +28,7 @@
You can implement step definitions for undefined steps with these snippets:
-func undefined() error {
- return godog.ErrPending
+func undefined() {
}
func InitializeScenario(ctx *godog.ScenarioContext) {
diff --git a/internal/formatters/formatter-tests/progress/some_scenarions_including_failing b/internal/formatters/formatter-tests/progress/some_scenarions_including_failing
index 43146df..221504e 100644
--- a/internal/formatters/formatter-tests/progress/some_scenarions_including_failing
+++ b/internal/formatters/formatter-tests/progress/some_scenarions_including_failing
@@ -14,8 +14,7 @@
You can implement step definitions for undefined steps with these snippets:
-func undefined() error {
- return godog.ErrPending
+func undefined() {
}
func InitializeScenario(ctx *godog.ScenarioContext) {
diff --git a/internal/formatters/undefined_snippets_gen.go b/internal/formatters/undefined_snippets_gen.go
index 7c4a7c5..8b477bb 100644
--- a/internal/formatters/undefined_snippets_gen.go
+++ b/internal/formatters/undefined_snippets_gen.go
@@ -23,8 +23,7 @@ var snippetHelperFuncs = template.FuncMap{
}
var undefinedSnippetsTpl = template.Must(template.New("snippets").Funcs(snippetHelperFuncs).Parse(`
-{{ range . }}func {{ .Method }}({{ .Args }}) error {
- return godog.ErrPending
+{{ range . }}func {{ .Method }}({{ .Args }}) {
}
{{end}}func InitializeScenario(ctx *godog.ScenarioContext) { {{ range . }}
diff --git a/run_progress_test.go b/run_progress_test.go
index 9585420..e3b8bc3 100644
--- a/run_progress_test.go
+++ b/run_progress_test.go
@@ -133,16 +133,13 @@ func Test_ProgressFormatterMultistepTemplates(t *testing.T) {
You can implement step definitions for undefined steps with these snippets:
-func three() error {
- return godog.ErrPending
+func three() {
}
-func unavailableCost(arg1 string, arg2 int) error {
- return godog.ErrPending
+func unavailableCost(arg1 string, arg2 int) {
}
-func undef() error {
- return godog.ErrPending
+func undef() {
}
func InitializeScenario(ctx *godog.ScenarioContext) {