hubot-mock-adapter-as-promised
A helper for hubot-mock-adapter with promise (bluebird).
Installation
Install with npm:
npm install -g coffee-scriptnpm install hubot-mock-adapter --save-devnpm install hubot-mock-adapter-as-promised --save-dev
Example
./scripts/ping.coffee
= robotrespond /PING$/i msgsend "PONG"
./test/ping_test.coffee
expect = require'chai'userequire'chai-as-promised'expecthubot = require'hubot-mock-adapter-as-promised' describe 'ping'-> hubotincludeContext -> robotloadFilerequire'path'resolve'.''scripts''ping.coffee' it 'responds PONG'-> expecthubottext'hubot ping' toeventuallyequal'PONG'
See more examples in ./example/test.