codegangsta/martini — pull request #41 by mholt (2013-11-15 06:20:43+00:00)
Title: Tests ported to GoConvey

Martini's pretty cool. To celebrate the successful launch of Martini and GoConvey on the very same day, I thought it would be fun to port Martini's tests to GoConvey (it *is* a web framework, after all, and GoConvey tests can report to the browser, so it seemed only fitting).

By doing this, I was able to remove `reflect` package import and a couple test utility functions that just made assertions anyway. I also had a hard time inferring the intent of some of the tests, so I made my best guess when writing the Convey statements (feel free to fix any I got wrong), but I think the tests make the code more self-documenting now.

Further, the `if` statements which performed the actual tests were backward (this is typical of Go tests). Similar to what used to be your helper `expect` and `refute` functions, `ShouldEqual` and `ShouldNotEqual` assertions make the tests much more readable across the board, without having to invert the logic in your brain as you read them.

It could probably be cleaned up a little but is a good start I think.

Anyway, I know that opinions about Go testing frameworks vary widely, but regardless, here is my contribution to Martini for now. :octocat: