           assert.equal textStatus, 'error'
           done()
 
+    it 'should be configurable via $.ajaxSetup', (done) ->
+
+      $.ajaxSetup
+        complete: (xhr, textStatus) ->
+          assert.equal textStatus, 'success'
+          done()
+
+      $.ajax '/test'
+
   describe 'contents', ->
 
-    it 'should allow custom contents handling', (done) ->
+    beforeEach ->
 
       Ti.Network.HTTPClient.mocks.push
         url: '/capture'


      assert.equal result.state(), 'resolved'

  describe 'beforeSend', ->

    beforeEach ->


      $.ajax('/capture').done (data, textStatus, xhr) ->
        assert.equal data.test, 'this'
        done()
      .fail (xhr, textStatus, error) ->
        throw error

    it 'should be configurable via $.ajaxSetup', (done) ->

      $.ajaxSetup
        dataType: 'json'

      $.ajax('/test').done (data, textStatus, xhr) ->
        assert.equal data.test, 'This is a test'
        done()
      .fail (xhr, textStatus, error) ->
        throw error
