1 | chai = require 'chai'
|
2 | sinon = require 'sinon'
|
3 | chai.use require 'sinon-chai'
|
4 |
|
5 | expect = chai.expect
|
6 |
|
7 | describe 'i have no idea what i\'m doing:', ->
|
8 | ihavenoidea_module = require('../src/ihavenoidea')
|
9 | imageUrlRegex = /^https?:\/\/(?:[a-z0-9\-]+\.)+[a-z]{2,6}(?:\/[^\/#?]+)+\.(?:jpe?g|gif|png)$/i
|
10 |
|
11 | beforeEach ->
|
12 | @robot =
|
13 | respond: sinon.spy()
|
14 | hear: sinon.spy()
|
15 | @msg =
|
16 | send: sinon.spy()
|
17 | random: sinon.spy()
|
18 | @ihavenoidea_module = ihavenoidea_module(@robot)
|
19 |
|
20 | it 'should register a hear listener', ->
|
21 | expect(@robot.hear).to.have.been.calledWith(/i have no idea what i'm doing/)
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|