Skip to content

Commit

Permalink
Fix Ginkgo stack trace on failure for Specify
Browse files Browse the repository at this point in the history
[fixes #414]
  • Loading branch information
williammartin committed Dec 19, 2017
1 parent bc14b66 commit b977ede
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ginkgo_dsl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b977ede

Please sign in to comment.