1 | chai = require 'chai'
|
2 | sinon = require 'sinon'
|
3 | chai.use require 'sinon-chai'
|
4 |
|
5 | expect = chai.expect
|
6 |
|
7 | describe 'hello-world', ->
|
8 | beforeEach ->
|
9 | @robot =
|
10 | respond: sinon.spy()
|
11 | hear: sinon.spy()
|
12 |
|
13 | require('../src/hello-world')(@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/) |
\ | No newline at end of file |