Preventing AJAX call with Jasmine and Sinon using Backbone
===

I'm just getting started testing my Backbone app with Sinon and Jasmine.  I have a view that look something like (coffeescript):

      initialize: ->
        @collection.on 'reset', @render, this
    
      render: ->
        if @collection.fetched
          # do stuff
        else
          @$el.append "<h3>Loading...</h3>"
        
          @collection.fetch()
        
        this

I want to test this with an unfetched collection, but I'm not sure how to fake an ajax call within my code (obviously can easily be done in the spec).  Is it possible with Sinon to override the fetch function to return a fake response?

Thank you for any help.

