Skip to content

Instantly share code, notes, and snippets.

@sleepynate
Created February 1, 2012 06:03
Show Gist options
  • Select an option

  • Save sleepynate/1715403 to your computer and use it in GitHub Desktop.

Select an option

Save sleepynate/1715403 to your computer and use it in GitHub Desktop.
backbone events wat
it("derps when using a space in an event name", function() {
var callback = jasmine.createSpy('-Custom Event Callback-');
obj.bind('all', callback);
obj.trigger("foo bar");
expect(callback.callCount).toBe(1);
expect(callback.mostRecentCall.args[0]).toBe('foo bar');
});
@sleepynate
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment