Skip to content

Instantly share code, notes, and snippets.

@joecorcoran
Created November 12, 2010 16:52
Show Gist options
  • Save joecorcoran/674339 to your computer and use it in GitHub Desktop.
Save joecorcoran/674339 to your computer and use it in GitHub Desktop.
toHaveEvent: function(eventType){
return (this.actual.data('events')) && (typeof this.actual.data('events')[eventType] == 'object');
}
toHaveLive: function(eventType) {
var hasLive, actual = this.actual;
$.each($(document).data('events')['live'], function(i, item) {
hasLive = ((item.selector == actual.selector) && (item.origType == eventType));
if (hasLive) return false;
});
return hasLive;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment