From c79b7c2b3644f53426ce0e44a355ed2d5c7679da Mon Sep 17 00:00:00 2001 From: Paul Bonser Date: Tue, 27 Sep 2016 14:29:47 -0500 Subject: [PATCH] Add ginkgo for testing --- Makefile | 8 ++++++-- glide.lock | 10 ++++++++-- glide.yaml | 6 ++++++ goes_suite_test.go | 13 +++++++++++++ 4 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 goes_suite_test.go diff --git a/Makefile b/Makefile index 4de8169..d27ce07 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,13 @@ help: @echo "Available targets:" @echo "- test: run tests" @echo "- deps: installs dependencies with glide" + @echo "- watch: watch for changes and re-run tests" deps: - glide up + glide install test: deps - go test -i && go test + ginkgo -race -randomizeAllSpecs -r -skipPackage vendor -progress . + +watch: deps + ginkgo watch -race -randomizeAllSpecs -r -skipPackage vendor -progress -notify . diff --git a/glide.lock b/glide.lock index 21728fd..088757e 100644 --- a/glide.lock +++ b/glide.lock @@ -1,6 +1,12 @@ -hash: 7e39b5bd354c3f0770ca3a9d28a74a0523695d18effa1e540f006b325defcfe7 -updated: 2016-07-26T14:50:32.597335795-05:00 +hash: 02db47097959405b1a7e0e1e583c6fbb11c7236c450264909a4e9ac690ef4d47 +updated: 2016-09-27T11:54:53.427061181-05:00 imports: [] testImports: - name: github.com/go-check/check version: 4f90aeace3a26ad7021961c297b22c42160c7b25 +- name: github.com/onsi/ginkgo + version: 462326b1628e124b23f42e87a8f2750e3c4e2d24 + subpackages: + - ginkgo +- name: github.com/onsi/gomega + version: a78ae492d53aad5a7a232d0d0462c14c400e3ee7 diff --git a/glide.yaml b/glide.yaml index 1942ac4..37a1849 100644 --- a/glide.yaml +++ b/glide.yaml @@ -3,3 +3,9 @@ import: [] testImport: - package: github.com/go-check/check version: v1 +- package: github.com/onsi/ginkgo + version: ^1.2.0 + subpackages: + - ginkgo +- package: github.com/onsi/gomega + version: ^1.0.0 diff --git a/goes_suite_test.go b/goes_suite_test.go new file mode 100644 index 0000000..2740b16 --- /dev/null +++ b/goes_suite_test.go @@ -0,0 +1,13 @@ +package goes_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + "testing" +) + +func TestGoes(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Goes Suite") +}