timsavery/node-hmock — pull request #1 by lrdcasimir (2014-06-23 17:49:04+00:00)
Title: Create gmock export that doesn't override request

Some of my tests use the real http.request to call S3, some use hmock, so I hacked this up to allow injecting like this without overriding the global request:
````JS
hmock = require('hmock/gmock')
...
hmock.expect()
.post("http://api.newrelic.com/deployments.xml")
.withHeader("x-api-key", expectedApiKey)
.withBody(querystring.stringify());
var l = new nr_logger.Logger({}, hmock.request());
l.recordDeploy("US",buildInfo, function(err){
hmock.verify();
done(err);
});