       expect(socketStub.leave.calledWith 'RoomName').to.be.ok
 
 
-  describe 'receiving a eventric:rpcRequest event', ->
+  describe 'receiving an eventric:rpcRequest event', ->
     socketStub = null
     rpcRequestFake = null
     rpcHandlerStub = null

      expect(ioStub.sockets.on.calledWith 'connection', sinon.match.func).to.be.ok


  describe 'receiving a eventric:joinRoom socket event', ->
    socketStub = null

    beforeEach ->

      describe 'which rejects', ->

        responseFake = null

        beforeEach (done) ->
          responseFake = {}
          errorFake = new Error 'The error message'
          rpcRequestMiddlewareStub.returns new Promise (resolve, reject) -> reject errorFake
          rpcHandlerStub.yields null, responseFake
          endpoint.initialize
