       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

      describe 'which rejects', ->

        responseFake = null
        errorFake = null

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



        it 'should emit a eventric:rpcResponse event with an error', ->
          expect(
            socketStub.emit.calledWith(
              'eventric:rpcResponse', {
                rpcId: rpcRequestFake.rpcId,
                error: {message: 'The error message', name: 'Error'},
                data: null
              }
            )
          ).to.be.ok


  describe '#publish', ->
