// Generated by CoffeeScript 1.7.1
(function() {
  window.Backbone.sync = jasmine.createSpy('sync').andCallFake(function(method, model, options) {
    var callback, resp, status, xhr;
    model.updatedByRemoteSync = true;
    resp = options.serverResponse || model.toJSON();
    status = 200;
    callback = options.success;
    xhr = {
      status: status,
      response: resp
    };
    if (typeof options.errorStatus === 'number') {
      resp.status = status = options.errorStatus;
      callback = options.error;
    }
    if (Backbone.VERSION === '0.9.10') {
      callback(model, resp, options);
    } else if (Backbone.VERSION[0] === '0') {
      callback(resp, status, xhr);
    } else {
      options.xhr = xhr;
      callback(resp);
    }
    return xhr;
  });

}).call(this);

//# sourceMappingURL=spec_helper.map
