       @dialogue.config.timeout.should.equal 555
       @dialogue.config.timeoutLine.should.equal 'Testing timeout options'
 
-  context 'Create a Dialogue with 100ms timeout', ->
+  context 'Dialogue created with 100ms timeout', ->
 
     beforeEach (done) ->
       @eventSpy = sinon.spy()

      @dialogue.config.timeout.should.equal 500
      @dialogue.config.timeoutLine.should.equal 'Testing timeout env'

  context 'Create a Dialogue with options', ->

    beforeEach ->
      @dialogue = new Dialogue @res,

    _.invoke @spy, 'restore' # restore all the methods
    @room.destroy()

  context 'Dialogue created with defaults', ->

    beforeEach -> @dialogue = new Dialogue @res
    afterEach -> clearTimeout @dialogue.countdown

    it 'inherits event emmiter', ->
      @dialogue.should.be.instanceof EventEmitter
      @dialogue.emit.should.be.a 'function'

    it 'has the logger from response object robot', ->
      @dialogue.logger.should.eql @room.robot.logger

    it 'has an empty choices array', ->
      @dialogue.choices.should.be.an 'array'
      @dialogue.choices.length.should.equal 0

    it 'has config with defaults of correct type', ->
      @dialogue.config.should.be.an 'object'
      @dialogue.config.timeout.should.be.a 'number'
      @dialogue.config.timeoutLine.should.be.a 'string'

    it 'starts timeout', ->
      @dialogue.countdown.should.exist
      @dialogue.countdown.should.be.instanceof Timeout
      @spy.startTimeout.should.have.been.calledOnce

  context 'Dialogue created with env vars', ->

    beforeEach ->
      process.env.DIALOGUE_TIMEOUT = 500
