Skip to content

Instantly share code, notes, and snippets.

@deedubs
Created January 23, 2011 00:50
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 deedubs/791686 to your computer and use it in GitHub Desktop.
Save deedubs/791686 to your computer and use it in GitHub Desktop.
vows = require 'vows'
assert = require 'assert'
vows
.describe('Division by Zero')
.addBatch
'when dividing a number by zero':
topic: -> 42/ 0
'we get Infinity': (topic) ->
assert.equal topic, Infinity
'but when dividing zero be zero':
topic: -> 0 / 0
'we get a value which':
'is not a number': (topic) ->
assert.isNaN topic
'is not equal to itself': (topic) ->
assert.notEqual topic, topic
.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment