Skip to content

Instantly share code, notes, and snippets.

@matthewhudson
Created March 10, 2013 23:15
Show Gist options
  • Save matthewhudson/5130944 to your computer and use it in GitHub Desktop.
Save matthewhudson/5130944 to your computer and use it in GitHub Desktop.
VowsJS + CoffeeScript
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 by 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
.export(module)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment