velesin/jasmine-jquery — pull request #42 by jandudulski (2011-12-06 21:33:12+00:00)
Title: Added new matcher to spyOnEvent: toHaveBeenPreventedOn

I were looking for a way to test if my event preventing works but simple:

```
it("prevents event", function() {
$("#element").pluginWithPrevent();
$("#element").bind("click", function(event) {
expect(event.isDefaultPrevented).toBe(true);
});
$("#element").click();
});
```

But for couple of reasons that doesn't work. So I tried to add matcher `toHaveBeenPreventedOn`, similar to `toHaveBeenTriggeredOn`, and it works for me.