Skip to content

Instantly share code, notes, and snippets.

@arunthampi
Created February 3, 2011 16:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arunthampi/809721 to your computer and use it in GitHub Desktop.
Save arunthampi/809721 to your computer and use it in GitHub Desktop.
Testing Web Sockets (Pusher) with Jasmine
describe('pusher', function() {
describe('message event', function() {
it("should append the message to the timeline", function() {
spyOn(room, 'appendMessage');
spec.loadFixture('room-show');
room.pusher.send_local_event('message', messageStub('abc-def-ced'), room.room_id);
expect(room.appendMessage).toHaveBeenCalled();
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment