lib/assets/javascripts/fake_ajax_server.js.coffee in fake-ajax-server-0.0.2 vs lib/assets/javascripts/fake_ajax_server.js.coffee in fake-ajax-server-0.0.3
- old
+ new
@@ -19,8 +19,9 @@
ajaxResponse: (index = 0)-> @ajaxCallbacksQueue[index][1]
ajaxSettings: (index = 0)-> @ajaxCallbacksQueue[index][0][0]
createFakeJqXHR: ->
xhr = jQuery.Deferred()
+ xhr.abort = ->
(xhr[m] = (->) for m in ['error', 'success', 'complete']) if @options.legacySupport
sinon.stub xhr, m, (-> xhr) for m, f of xhr when typeof f is 'function'
xhr