Comparing version 0.5.2 to 0.5.3
@@ -26,7 +26,9 @@ var http = require('http'); | ||
ret.push(options.path); | ||
ret.push("'"); | ||
if (requestBody) { | ||
ret.push(', '); | ||
ret.push(", '"); | ||
ret.push(JSON.stringify(requestBody)); | ||
ret.push("'"); | ||
} | ||
ret.push("')\n"); | ||
ret.push(")\n"); | ||
@@ -72,3 +74,3 @@ ret.push(' .reply(') | ||
} | ||
} | ||
}; | ||
oldEnd = req.end; | ||
@@ -80,5 +82,5 @@ req.end = function(data) { | ||
oldEnd.apply(req, arguments); | ||
} | ||
}; | ||
return req; | ||
} | ||
}; | ||
} | ||
@@ -85,0 +87,0 @@ |
{ "name" : "nock" | ||
, "description" : "HTTP Server mocking for Node.js" | ||
, "tags" : ["Mock", "HTTP", "testing", "isolation"] | ||
, "version" : "0.5.2" | ||
, "version" : "0.5.3" | ||
, "author" : "Pedro Teixeira <pedro.teixeira@gmail.com>" | ||
@@ -6,0 +6,0 @@ , "contributors" : |
@@ -22,3 +22,3 @@ var nock = require('../.') | ||
t.equal(ret.length, 1); | ||
t.equal(ret[0].indexOf("\nnock('expensecat.iriscouch.com')\n .post('/, \"ABCDEF\"')\n .reply("), 0); | ||
t.equal(ret[0].indexOf("\nnock('expensecat.iriscouch.com')\n .post('/', '\"ABCDEF\"')\n .reply("), 0); | ||
t.end(); | ||
@@ -25,0 +25,0 @@ }); |
39032
1101