Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing skip for evaluation by onsi #382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions ginkgo_dsl.go
Expand Up @@ -283,6 +283,12 @@ func Describe(text string, body func()) bool {
return true
}

// You can wrap the method in your own meta framework and still get valid errors
func DescribeSkip(text string, skip int, body func()) bool {
globalSuite.PushContainerNode(text, body, types.FlagTypeNone, codelocation.New(skip + 1))
return true
}

//You can focus the tests within a describe block using FDescribe
func FDescribe(text string, body func()) bool {
globalSuite.PushContainerNode(text, body, types.FlagTypeFocused, codelocation.New(1))
Expand Down Expand Up @@ -340,6 +346,12 @@ func It(text string, body interface{}, timeout ...float64) bool {
return true
}

// You can wrap it with your own framework
func ItSkip(text string, skip int, body interface{}, timeout ...float64) bool {
globalSuite.PushItNode(text, body, types.FlagTypeNone, codelocation.New(skip + 1), parseTimeout(timeout...))
return true
}

//You can focus individual Its using FIt
func FIt(text string, body interface{}, timeout ...float64) bool {
globalSuite.PushItNode(text, body, types.FlagTypeFocused, codelocation.New(1), parseTimeout(timeout...))
Expand All @@ -352,6 +364,12 @@ func PIt(text string, _ ...interface{}) bool {
return true
}

// You can wrap PIt in your own framework
func PItSkip(text string, skip int, _ ...interface{}) bool {
globalSuite.PushItNode(text, func() {}, types.FlagTypePending, codelocation.New(skip + 1), 0)
return true
}

//You can mark Its as pending using XIt
func XIt(text string, _ ...interface{}) bool {
globalSuite.PushItNode(text, func() {}, types.FlagTypePending, codelocation.New(1), 0)
Expand Down