cjohansen/Sinon.JS — pull request #349 by jansuchy (2013-11-16 01:17:52+00:00)
Title: Auto-respond to successive requests made with a single XHR object

fakeServer's auto-respond feature does not work for code that caches a single XHR instance and does several requests with it.

The problem is that the auto-respond timeout starts ticking right after the XHR object is created, not when the request is actually sent.

This simple patch fixes that. Tests included.