Skip to content

Instantly share code, notes, and snippets.

@levicole
Created June 17, 2011 00:05
Show Gist options
  • Save levicole/1030615 to your computer and use it in GitHub Desktop.
Save levicole/1030615 to your computer and use it in GitHub Desktop.
it 'can apply the canvas to the DOM', ->
(setFixtures sandbox())
@canvas.write('#sandbox')
(expect document.getElementById("sandbox")).toContain('canvas')
it 'can clear the canvas', ->
ctx = @canvas.ctx
spyOn(ctx, 'clearRect')
@canvas.clear()
expect(ctx.clearRect).toHaveBeenCalled()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment