       ended = false
 
       listener1 = (a,b,c,callback) ->
-
         setTimeout ->
           listener1Args = [a,b,c]
           listener1Called = true

        listener2Args = [a,b,c]
        expect(listener1Called).toBeTruthy()
        expect(listener1Args).toEqual(listener2Args)
        done()

      signal = new Signal

      signal.add listener1
      signal.add listener2

      signal.dispatch(1,2,3)

    it 'should call back the passed-in function
        at the end of the dispatch'.squeeze(), (done) ->

      listener1 = (a, b, c, callback) -> setTimeout (-> callback()), 100
      listener2 = (a, b, c, callback) -> setTimeout (-> callback()), 100


      signal.add listener1
      signal.add listener2
      ms = new Date().valueOf()

      runs ->
        signal.dispatch 1, 2, 3, ->
          ms = new Date().valueOf() - ms

          expect(ms >= 200).toBeTruthy()
          ended = true

      waitsFor progress(-> ended), 'Signal timed out', 1000

  describe 'when a listener signature have been specified', ->
    it 'should prevent invalid listener to be passed', ->
