Hubot test helper
Install
npm install hubot-test-helper --save-dev
Usage
If you have a following hubot script:
= robotrespond /hi$/i msgreply 'hi'
You can test it like:
Helper = require'hubot-test-helper'# helper loads all scripts passed a directory helper = './scripts' # helper loads a specific script if it's a file scriptHelper = './scripts/specific-script.coffee' expect = require'chai'expect describe 'hello-world'-> room = null beforeEach -> room = helpercreateRoom context 'user says hi to hubot'-> beforeEach -> roomusersay 'alice''@hubot hi' roomusersay 'bob''@hubot hi' it 'should reply to user'-> expectroommessagestoeql 'alice''@hubot hi' 'hubot''@alice hi' 'bob''@hubot hi' 'hubot''@bob hi'