go-json-rest
go-json-rest copied to clipboard
Update test utils to use an interface instead of *testing.T
I'm using Ginkgo as a testing framework and I noticed that it doesn't directly plug into Ginkgo because Ginkgo will not directly expose the *testing.T in it's tests.
By using an interface, TestReporter (similar to how gomock works), we can then leverage GinkgoT() with the test.RunReporter function, like such:
test.RunRequest(GinkgoT(), api.MakeHandler(), test.MakeSimpleRequest("GET", "/version", nil))