UNPKG

432 Btext/coffeescriptView Raw
1chai = require 'chai'
2sinon = require 'sinon'
3chai.use require 'sinon-chai'
4
5expect = chai.expect
6
7describe 'mubot', ->
8 beforeEach ->
9 @robot =
10 respond: sinon.spy()
11 hear: sinon.spy()
12
13 require('../src/mubot')(@robot)
14
15 it 'registers a respond listener', ->
16 expect(@robot.respond).to.have.been.calledWith(/hello/)
17
18 it 'registers a hear listener', ->
19 expect(@robot.hear).to.have.been.calledWith(/orly/)