   describe 'with no error status code', ->
 
     before ->
+        send = sinon.spy()
+        status = sinon.stub().returns { send: send }
+
         err = {}
         req = {}
-        res = send: sinon.spy()
+        res = { status: status }
         next = sinon.spy()
         error err, req, res, next
 
     it 'should respond 500', ->
-      res.send.should.have.been.calledWith 500
+      res.status.should.have.been.calledWith 500
 
     it 'should respond with error message', ->
-      res.send.should.have.been.calledWith(
-        sinon.match.number, 'Internal Server Error'
-      )
+      send.should.have.been.calledWith 'Internal Server Error'


        req = {}

        res =
          status: sinon.spy()
          json: sinon.spy()
          set: sinon.spy (headers) -> res.headers = headers
          render: sinon.spy()
          redirect: sinon.spy()

describe 'Error Response', ->


  {err,req,res,next,json,send} = {}


  describe 'with 302 status code', ->
