howardabrams/node-mocks-http — pull request #4 by ericchaves (2012-12-24 00:33:38+00:00)
Title: Res.send now supports response structures used in API (at least Restify)

Hi @howardabrams,

I extended your library a little but so it could also handle some structured responses. By doing so res.send now evaluate the data passed and search for either a statusCode or httpCode to be used, and also for a body to send as _data.

It still working as expected (at least tests passed) for regular HTTP responses.

Although I did it with node-restify in mind, it should work well for all other libs.

Please take a look and see what you think. If you like it, feel free to merge.

Cheers,

Eric