Q:

Golang getting error messages with httptest failures

How can one get the error message with httptest when you get back a 500 server error?
The sign up page works when manually tested, so this appears to be some plumbing problem, but I cannot find what the message is. 
func TestSignUp(t *testing.T) {
    var (
        password = "password"
    )

    newUser := entities.User{}
    newUser.Email = "j@doe.co.za"   
    newUser.SetPassword(password, bcrypt.MinCost)

    v := url.Values{}
    v.Add("email_address", newUser.Email)
    v.Add("password", password)     

    res := httptest.NewRecorder()
    req := &http.Request{
        Method: "POST",
        URL:    &url.URL{Path: "/signup"},
        Form:   v,
    }

    m := Martini()
    m.ServeHTTP(res, req)

    assert.Equal(t, 200, res.Code) <<<< res.Code = 500, but where is the error message?
}

A:

Looking at the example for httptest.Recorder (http://golang.org/pkg/net/http/httptest/#example_ResponseRecorder) it looks res.Body.String() is what you want.

