hubot-illegal-legal
Version:
Punch in a word or phase and this brain will tell you whether or not it's legal or illegal.
20 lines (14 loc) • 448 B
text/coffeescript
chai = require 'chai'
sinon = require 'sinon'
chai.use require 'sinon-chai'
expect = chai.expect
describe 'illegal-legal', ->
beforeEach ->
@robot =
respond: sinon.spy()
hear: sinon.spy()
require('../src/illegal-legal')(@robot)
it 'registers a respond listener', ->
expect(@robot.respond).to.have.been.calledWith(/hello/)
it 'registers a hear listener', ->
expect(@robot.hear).to.have.been.calledWith(/orly/)