For bonus points, and general knowledge, look into spyOn.andCallFake. This is a cool method that will stub and clean up for you on each spec.

```js
spyOn($, 'ajax').andCallFake(function() {
//cool code here
});
```