diff --git a/godog_and_gomega.go b/godog_and_gomega.go index b21e225..f4fad92 100644 --- a/godog_and_gomega.go +++ b/godog_and_gomega.go @@ -44,6 +44,9 @@ func getTestAssertPlace() string { } func getTestAssertFullPathPlace() string { _, file, line, _ := runtime.Caller(CALL_STACK_DEPTH_TO_TEST_FILE) + if strings.HasSuffix(file, "godog_and_gomega/helpers.go") { + _, file, line, _ = runtime.Caller(CALL_STACK_DEPTH_TO_TEST_FILE + 1) + } return fmt.Sprintf("%v:%v", file, line) } func getProjectRootRelativeTestAssertPlace(place string) string {