cjohansen/Sinon.JS — pull request #322 by jonnyreeves (2013-09-08 14:25:32+00:00)
Title: Added `spy.getCalls()` to allow iteration of invocations

I've come across a couple of situations where I want to use some of the Array iteration methods to filer which calls I want to interact with, for example:

```js
// Yield all calls where the third argument was passed as `foo`.
spy.getCalls()
.filter(function (call) {
return call.args[2] === "foo";
})
.forEach(function (call) {
call.yield();
});
```