         expect(error.message.code).to.equal("ECONNREFUSED")
 
   describe 'cancellable promises', ->
-    oldAbort = undefined
-    abortSpy = undefined
 
     beforeEach ->
-      oldAbort = request.Request.prototype.abort
-      request.Request.prototype.abort = abortSpy = sinon.spy()
+      sinon.stub request.Request.prototype, 'abort'
 
     afterEach ->
-      request.Request.prototype.abort = oldAbort
+      request.Request.prototype.abort.restore()
 
     describe 'cancel without reason', ->
 

          .cancel new CustomCancellationError

        setImmediate ->
          expect(abortSpy.called).to.be.true
          done()

      it 'should throw a custom error when the promise is

          .cancel()

        setImmediate ->
          expect(request.Request.prototype.abort.called).to.be.true
          done()

      it 'should throw a bluebird CancellationError when the
