Skip to content

Instantly share code, notes, and snippets.

@MichaelJosephKramer
Created January 31, 2013 18:27
Show Gist options
  • Save MichaelJosephKramer/4685049 to your computer and use it in GitHub Desktop.
Save MichaelJosephKramer/4685049 to your computer and use it in GitHub Desktop.
# Test setup, with jasmine-given
Given -> spyOn(Backbone.Model.prototype.fetch, 'call').andReturn
done: (callback) -> callback()
# Source, fetch override in model
fetch: (options) ->
Backbone.Model.prototype.fetch.call(@, options).done @callback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment