codegangsta/martini — pull request #154 by courtf (2014-01-13 18:58:48+00:00)
Title: add nil comparison test helpers

Hey, thanks for this great repo! I've been learning a lot from it.

This is fairly nitpicky, but I noticed a slight problem with the first test in `martini_test.go`, namely:

```
func Test_New(t *testing.T) {
m := New()
refute(t, m, nil)
}
```

The issue being that this test passes regardless of whether `m == nil` locally or not, and is a false negative currently. Try it for yourself:

```
func Test_New(t *testing.T) {
var m *Martini
m = nil
refute(t, m, nil)
}
```

The `refute` function takes its params as `interface{}`, so unless the value is itself a nil interface, a comparison with nil will always be `!=`. (see: http://golang.org/doc/faq#nil_error)

The pull request attempts to address this, although I feel like maybe it is too many lines of code? Criticism welcome as always!