velesin/jasmine-jquery — pull request #40 by jsantell (2011-11-22 23:19:34+00:00)
Title: Added matchers toDelegateAndHandle and toDelegateAndHandleWith

The behaviours mimic the toHandle and toHandleWith functionality, except work with delegation.

jQuery version detection since delegation is handled differently in 1.7+; While delegation isn't recommended going forward with 1.7, it's still necessary for older versions of jQuery. An on() test in the future wouldn't be a bad idea. Tests included.

Usage/added to README:
- `toDelegateAndHandle(delegated, eventName)`
- e.g. 'expect($form).toDelegateAndHandle($input, "click")'
- `toDelegateAndHandleWith(delegated, eventName, eventHandler)`
- e.g. 'expect($form).toDelegateAndHandleWith($input, "click", validateFunc)'