From b977ede560a5429a7d340d8d2ea86cd4fe414c6a Mon Sep 17 00:00:00 2001 From: Will Martin Date: Tue, 19 Dec 2017 17:10:53 +0100 Subject: [PATCH] Fix Ginkgo stack trace on failure for Specify [fixes #414] --- ginkgo_dsl.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ginkgo_dsl.go b/ginkgo_dsl.go index 7e63bd21a..9ab1c9a94 100644 --- a/ginkgo_dsl.go +++ b/ginkgo_dsl.go @@ -362,22 +362,26 @@ func XIt(text string, _ ...interface{}) bool { //which "It" does not fit into a natural sentence flow. All the same protocols apply for Specify blocks //which apply to It blocks. func Specify(text string, body interface{}, timeout ...float64) bool { - return It(text, body, timeout...) + globalSuite.PushItNode(text, body, types.FlagTypeNone, codelocation.New(1), parseTimeout(timeout...)) + return true } //You can focus individual Specifys using FSpecify func FSpecify(text string, body interface{}, timeout ...float64) bool { - return FIt(text, body, timeout...) + globalSuite.PushItNode(text, body, types.FlagTypeFocused, codelocation.New(1), parseTimeout(timeout...)) + return true } //You can mark Specifys as pending using PSpecify func PSpecify(text string, is ...interface{}) bool { - return PIt(text, is...) + globalSuite.PushItNode(text, func() {}, types.FlagTypePending, codelocation.New(1), 0) + return true } //You can mark Specifys as pending using XSpecify func XSpecify(text string, is ...interface{}) bool { - return XIt(text, is...) + globalSuite.PushItNode(text, func() {}, types.FlagTypePending, codelocation.New(1), 0) + return true } //By allows you to better document large Its.