go-bdd / gobdd

BDD framework
https://go-bdd.github.io/gobdd/
MIT License
115 stars 19 forks source link

Add keyword before name #113

Closed sagikazarmark closed 4 years ago

sagikazarmark commented 4 years ago

Fixes #108

(See the test runs for details)

bkielbasa commented 4 years ago

Looks cool! I'd add it in one more place:

--- a/gobdd.go
+++ b/gobdd.go
@@ -241,7 +241,7 @@ func (s *Suite) runFeature(feature *msgs.GherkinDocument_Feature) error {

        hasErrors := false

-       s.t.Run(feature.Name, func(t *testing.T) {
+       s.t.Run(fmt.Sprintf("%s %s", strings.TrimSpace(feature.Keyword), feature.Name), func(t *testing.T) {

(cannot suggest in the PR)

sagikazarmark commented 4 years ago

Makes sense, added.

bkielbasa commented 4 years ago

Awesome, thanks!