title: Callback not firing from the sinon.js fakeServer for a call to $.ajax
body: <p>I have the following jasmine spec:</p>
  
  <pre><code>describe "plugins", -&gt;
      beforeEach -&gt;
      @server = sinon.fakeServer.create()
  
      afterEach -&gt;
      @server.restore()
  
      describe "reviewStatus", -&gt;
      it "should attach dates to content", -&gt;
        @server.respondWith("GET", "/GeneralDocument.mvc.aspx/GetDocumentParent?typeName=ncontinuity2.core.domain.Plan&amp;documentParentUid=45f0bccb-27c9-410a-bca8-9ff900ab4c28d",
          [200, {"Content-Type": "application/json"},
          '{"ReviewDate":"22/09/2012","AcknowledgedDate":"05/07/2012"}'])   
  
        $('#jasmine_content').addReviewStatus('ncontinuity2.domain.Plan', "45f0bccb-27c9-410a-bca8-9ff900ab4c28")     
  
        @server.respond()
  
        expect($('#reviewDateTab').find("strong").eq(0).length).toEqual(1)
  </code></pre>
  
  <p>The addReviewStatus is a jQuery plugin I have written:</p>
  
  <pre><code>do($ = jQuery) -&gt;
      $.fn.extend
          addReviewStatus: (type, uid) -&gt;
              ele = @
  
              reviewData = null           
  
              getJSON '/GeneralDocument.mvc.aspx/GetDocumentParent', {typeName: type, documentParentUid: uid}, 
                                  (document) -&gt;
                                      console.log('document = ' + document)
                                      compileTemplate(ele, document)
                                  (response) -&gt;
                                      showErrorMessage resonse.responseText
  #etc., etc.
  </code></pre>
  
  <p>The getJSON method above calls $.ajax like this:</p>
  
  <pre><code>function getJSON(url, params, ajaxCallBack, ajaxErrorHandler, excludeProgress){
      var e = (ajaxErrorHandler) ? ajaxErrorHandler : validationErrorCallBack;
      var s = (ajaxCallBack) ? ajaxCallBack : jsonCallBack;
      $.ajax({
          type: "GET",
          url: url,
          cache: false, 
          data: params,
          beforeSend: function(xhr) {
              xhr.setRequestHeader("Ajax", "true");
              xhr.setRequestHeader("UseAjaxError", "true");
          },
          complete: function() {
          },
          success: s,
          timeout: _ajaxTimeOut,
          dataType: "json",
          error: e
      });
  }
  </code></pre>
  
  <p>The anonymous function callback of the getJSON method is not being fired.  Also the call to $.ajax is returning a 404 not found.  Can anyone see what I am doing wrong?</p>