velesin/jasmine-jquery — pull request #195 by ryanwalters (2014-06-09 20:55:40+00:00)
Title: Event Spies: Added functions to check call counts

Jasmine equivalents:
`.calls.any()`
http://jasmine.github.io/2.0/introduction.html#section-23

`.calls.count()`
http://jasmine.github.io/2.0/introduction.html#section-24

Example tests:

var spyEvent = spyOnEvent('#some_element', 'click');

// Passing
expect(spyEvent.calls.any()).toEqual(false);
$('#some_element').click();
expect(spyEvent.calls.count()).toEqual(1);

// Failing
expect(spyEvent.calls.any().toEqual(false);
expect(spyEvent.calls.count()).toEqual(0);