 
       it 'handles endpoint and args match', ->
         state = {}
-        sinon.stub @giphy, 'match', ->
-          [ null, 'test1', 'test2' ]
+        sinon.stub @giphy, 'match', -> [ null, 'test1', 'test2' ]
         @giphy.getEndpoint state
         @giphy.match.restore()
         state.endpoint.should.eql 'test1'

        @msg.send.should.not.have.been.called

    describe '.respond', ->

    describe '.getTrendingUri', ->
    describe '.getHelp', ->
    describe '.getUri', ->

    describe '.sendResponse', ->
      beforeEach ->
        sinon.stub @giphy, 'sendMessage'
        sinon.stub @giphy, 'error'

      afterEach ->
        @giphy.sendMessage.restore()
        @giphy.error.restore()

      it 'handles state with a uri', ->
        @giphy.sendResponse { msg: 'msg', uri: 'uri' }
        @giphy.sendMessage.should.be.called.once
        @giphy.sendMessage.should.be.calledWith 'msg', 'uri'

      it 'handles state without a uri', ->
        @giphy.sendResponse {}
        @giphy.error.should.be.called.once

    describe '.sendMessage', ->
      it 'sends a message when msg and message are valid', ->
        @giphy.sendMessage @msg, 'testing'
