1.2.2 • Published 9 years ago

hubot-mock-adapter-as-promised v1.2.2

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

hubot-mock-adapter-as-promised

npm version Build Status

A helper for hubot-mock-adapter with promise (bluebird).

Installation

Install with npm:

npm install -g coffee-script
npm install hubot-mock-adapter --save-dev
npm install hubot-mock-adapter-as-promised --save-dev

Example

./scripts/ping.coffee

module.exports = (robot) ->
  robot.respond /PING$/i, (msg) ->
    msg.send "PONG"

./test/ping_test.coffee

expect = require('chai').use(require('chai-as-promised')).expect
hubot = require('hubot-mock-adapter-as-promised')

describe 'ping', ->
  hubot.includeContext ->
    robot.loadFile(require('path').resolve('.', 'scripts'), 'ping.coffee')

  it 'responds PONG', ->
    expect(hubot.text('hubot ping'))
      .to.eventually.equal('PONG')

See more examples in ./example/test.

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago