trek/fakehr — pull request #6 by mixonic (2014-03-14 20:06:34+00:00)
Title: Introduce .stub and .expect

Introduce two new ways to interact with API stubbing. .stub will handle
requests matching a given description:

fakehr.stub('get', '/wingding').response(200);
$.ajax({
method: 'get',
url: '/wingding',
success: function(){
console.log('huzzah!');
}
});

And expect will raise an exception during .clear if there has been no
matching request.

fakehr.expect('get', '/wingding').response(200);
fakehr.reset(); // => fakehr expected a request for {"url":"/wingding","method":"get","readyState":1}