flatiron/nock — pull request #60 by atimb (2012-04-16 22:33:10+00:00)
Title: Reply with callback is now really a callback :)

The callback now receives the original request URI and request body, and evaluates per incoming request.
One can also use it to end an async testcase like this:

```
it("should exit when mocked request is sent", function(done) {
var mock = nock("http://google.com")
.filteringPath(/.*/, '*')
.filteringRequestBody(/.*/, '*')
.post("*", "*")
.reply(200, function(uri, requestBody) {
// uri and requestBody are the originals (before filtering)
done();
});
[...]
}
```

ps: My next patch will enable the usage of regexps in post() and get(), to get rid of the superfluous filtering* calls.