       unmute = mute() # supress hubot messages in test results
       @cb = sinon.spy @bot.listeners[0], 'callback'
       @bot.receive new TextMessage @user, 'Hubot which version', '111'
-      Q.delay(200).done =>
+      Q.delay(msDelay).done ->
         unmute()
         done()
 

  # TODO: why isn't this covering branch?
  context 'Bot responds to its alias', ->

    # rerun module with an alias'd bot
    beforeEach (done) ->
      @bot = new Robot 'hubot/src/adapters', 'shell'
      @bot.alias = 'buddy'
      require(module) @bot
      @response = sinon.spy @bot, 'Response'
      @cb = sinon.spy @bot.listeners[0], 'callback'
      unmute = mute()
      @bot.receive new TextMessage @user, 'buddy which version', '111'
      Q.delay(200).done =>
        unmute()
        done()

    it 'calls callback with response', ->
      @response.should.have.been.calledOnce
      @cb.should.have.been.calledOnce
      @cb.args[0][0].should.be.instanceof @spy.response


      unmute = mute() # supress hubot messages in test results
      @cb = sinon.spy @bot.listeners[1], 'callback'
      @bot.receive new TextMessage @user, 'Is Hubot listening?', '111'
      Q.delay(msDelay).done ->
        unmute()
        done()

