       it 'handles true then false result from getNextOption', ->
         state = { args: 'testing' }
         calls = 2
-        sinon.stub @giphy, 'getNextOption', (state) ->
-          (calls = calls - 1) > 0
+        sinon.stub @giphy, 'getNextOption', (state) -> (calls = calls - 1) > 0
         @giphy.getOptions state
         @giphy.getNextOption.should.be.called.twice
         @giphy.getNextOption.should.be.calledWith state


      it 'handles null match result', ->
        state = {}
        sinon.stub @giphy, 'match', ->
          null
        @giphy.getEndpoint state
        @giphy.match.restore()
        state.endpoint.should.eql ''


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