panic: You are trying to make an assertion, but Gomega's fail handler is nil.
If you're using Ginkgo then you probably forgot to put your assertion in an It().
Alternatively, you may have forgotten to register a fail handler with RegisterFailHandler() or RegisterTestingT().
goroutine 16 [running]:
runtime.panic(0x296840, 0xc208000d60)
/usr/local/Cellar/go/1.3.1/libexec/src/pkg/runtime/panic.c:279 +0xf5
github.com/onsi/gomega.ExpectWithOffset(0x0, 0x346ba0, 0xffffffffffffff5a, 0x0, 0x0, 0x0, 0x0, 0x0)
$GOPATH/github.com/onsi/gomega/gomega_dsl.go:139 +0x8e
github.com/onsi/gomega.Expect(0x346ba0, 0xffffffffffffff5a, 0x0, 0x0, 0x0, 0x0, 0x0)
$GOPATH/github.com/onsi/gomega/gomega_dsl.go:125 +0x6f
github.com/101loops/bdd.(*Checker).run(0xc208026b70, 0x61c9b0, 0x554e00, 0xc208000b30, 0x1, 0x1, 0x2611b)
$GOPATH/github.com/101loops/bdd/checker.go:102 +0x173
github.com/101loops/bdd.Check(0x346ba0, 0xffffffffffffff5a, 0x61c9b0, 0x554e00, 0xc208000b30, 0x1, 0x1, 0x2d4)
$GOPATH/github.com/101loops/bdd/checker.go:44 +0xa7
github.com/101loops/clock.func·004()
$GOPATH/github.com/101loops/clock/clock_test.go:9 +0x1ee
github.com/onsi/ginkgo/internal/suite.(*Suite).PushContainerNode(0xc20801a6e0, 0x37bd50, 0x5, 0x4293b0, 0x0, 0x53e557, 0x47, 0x15, 0xc208010600, 0x2d4)
$GOPATH/github.com/onsi/ginkgo/internal/suite/suite.go:132 +0x1f8
github.com/onsi/ginkgo.Context(0x37bd50, 0x5, 0x4293b0, 0x0)
$GOPATH/github.com/onsi/ginkgo/ginkgo_dsl.go:285 +0x8e
github.com/101loops/bdd.Context(0x37bd50, 0x5, 0x4293b0, 0x1)
$GOPATH/github.com/101loops/bdd/spec.go:21 +0x3b
github.com/101loops/clock.func·001()
$GOPATH/github.com/101loops/clock/clock_test.go:10 +0x3e
github.com/onsi/ginkgo/internal/suite.(*Suite).PushContainerNode(0xc20801a6e0, 0x38ecd0, 0xa, 0x429398, 0x0, 0x53e557, 0x47, 0xc, 0xc20808a600, 0x1e8)
$GOPATH/github.com/onsi/ginkgo/internal/suite/suite.go:132 +0x1f8
github.com/onsi/ginkgo.Describe(0x38ecd0, 0xa, 0x429398, 0x554b80)
$GOPATH/github.com/onsi/ginkgo/ginkgo_dsl.go:256 +0x8e
github.com/101loops/bdd.Describe(0x38ecd0, 0xa, 0x429398, 0xc208012900)
$GOPATH/github.com/101loops/bdd/spec.go:12 +0x3b
github.com/101loops/clock.init()
$GOPATH/github.com/101loops/clock/clock_test.go:32 +0x82
main.init()
github.com/101loops/clock/_test/_testmain.go:48 +0x46
So I'm not sure yet why this happens now. Apparently the ginkgo.Describe
/ ginkgo.Context
are already run before the bdd.RunSpecs
(and thereby ginkgo.RunSpecs
) is run? So no failure handler could have been registered yet.