Setup for this was like:
$ mkdir superdude
$ cd superdude
$ go mod init example.com/superdude
$ go get -u github.com/onsi/ginkgo/v2
$ go get -u "github.com/onsi/gomega"
# now put that in go bin
$ go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
You can run tests with go tests
just like:
$ go test -v
Or, with the ginkgo binary:
$ ginkgo
- Interesting that
superdude_test.go
ispackage superdude
, while thesuperdude_suite_test.go
ispackage superdude_test
. I'm not sure how theTestSuperdude
method insuperdude_suite_test.go
has gets a list of theDescribe
ed tests. It probably has something to do with the fact that Describe is being run at initialization time (to set the_
variable).