hubot-cah
Version:
Cards Against Humanity for Hubot
29 lines (22 loc) • 741 B
text/coffeescript
chai = require 'chai'
sinon = require 'sinon'
chai.use require 'sinon-chai'
expect = chai.expect
describe 'hello-world', ->
beforeEach ->
=
respond: sinon.spy()
hear: sinon.spy()
require('../src/hubot-cah')()
it 'registers a respond listener for "card me"', ->
expect(.respond).to.have.been.calledWithMatch sinon.match( (val) ->
val.test 'card me'
)
it 'registers a respond listener for "card me 2"', ->
expect(.respond).to.have.been.calledWithMatch sinon.match( (val) ->
val.test 'card me 2'
)
it 'registers a respond listener for "q card"', ->
expect(.respond).to.have.been.calledWithMatch sinon.match( (val) ->
val.test 'q card'
)