appendto/jquery-mockjax — pull request #100 by mileskin (2013-05-16 11:37:17+00:00)
Title: $.mockjax.mockedAjaxCalls() returns mocked ajax calls

This is handy when testing that expected ajax calls with expected options are executed by production code.

Sometimes it's necessary to isolate front-end tests from backend (e.g. json rest api) but still make sure that production code sends expected data to backend (in addition to only testing that production code works as expected with fake response).

For example we are using this kind of test code (sorry for CoffeeScript) with our monkey patched `$.mockjax`:

````
coffeescript
.verify ->
fooAjax = _.find $.mockjax.mockedAjaxCalls(), (ajaxOptions) ->
ajaxOptions.url.match('/api/v1/example')
expect(fooAjax.data).to.equal({foo: true})
```

It would be great to have this merged so we could remove our custom code!