octokit / go-octokit

Simple Go wrapper for the GitHub API
https://github.com/octokit/go-octokit
MIT License
258 stars 79 forks source link

Use Testify package for test assertions #71

Closed pengwynn closed 9 years ago

pengwynn commented 9 years ago

Prompted by @jingweno's comment, I whipped up a PR to swap out the bmizerany/assert testing package for stretchr/testify. I like testify because:

Before:

❯ go test ./...
?       github.com/octokit/go-octokit/examples  [no test files]
--- FAIL: TestClientRel (0.00 seconds)
        assert.go:15: /Users/wynn/go/src/github.com/octokit/go-octokit/octokit/root_test.go:37
        assert.go:24: ! 1 != nil

FAIL
FAIL    github.com/octokit/go-octokit/octokit   0.049s

After:

❯ go test ./...
?       github.com/octokit/go-octokit/examples  [no test files]
--- FAIL: TestClientRel (0.00 seconds)
        Location:       root_test.go:37
        Error:          Not equal: 1 (expected)
                                != <nil> (actual)

FAIL
FAIL    github.com/octokit/go-octokit/octokit   0.048s

I made a pass over the tests and made some updates where one of the new assertions made the tests easier to grok.

owenthereal commented 9 years ago

:shipit: