Skip to content

Commit

Permalink
possible option to prevent errors on mult imports
Browse files Browse the repository at this point in the history
  • Loading branch information
carldunham committed Jul 14, 2018
1 parent 66582ab commit 48bd5be
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ginkgo_dsl.go
Expand Up @@ -51,11 +51,17 @@ const defaultTimeout = 1
var globalSuite *suite.Suite
var globalFailer *failer.Failer

var instance = 0

func init() {
config.Flags(flag.CommandLine, "ginkgo", true)
GinkgoWriter = writer.New(os.Stdout)
globalFailer = failer.New()
globalSuite = suite.New(globalFailer)
if instance == 0 {
config.Flags(flag.CommandLine, "ginkgo", true)
GinkgoWriter = writer.New(os.Stdout)
globalFailer = failer.New()
globalSuite = suite.New(globalFailer)
}
config.Flags(flag.CommandLine, fmt.Sprintf("ginkgo%d", instance), true)
instance++
}

//GinkgoWriter implements an io.Writer
Expand Down

0 comments on commit 48bd5be

Please sign in to comment.