UNPKG

hubot-catme2

Version:

Catme is the most importantest hubot script. This script is based on hubot-catme but uses an API key to get more images.

26 lines (18 loc) 719 B
chai = require 'chai' sinon = require 'sinon' chai.use require 'sinon-chai' expect = chai.expect describe 'catme', -> beforeEach -> @robot = respond: sinon.spy() hear: sinon.spy() require('../src/catme')(@robot) it 'registers a respond listener', -> expect(@robot.respond).to.have.been.calledWith(/cat( me)?$/i) it 'registers a respond listener', -> expect(@robot.respond).to.have.been.calledWith(/cat bomb( (\d+))?/i) it 'registers a respond listener', -> expect(@robot.respond).to.have.been.calledWith(/cat categories/i) it 'registers a respond listener', -> expect(@robot.respond).to.have.been.calledWith(/cat( me)? (with|in)( (\w+))?/i)