Skip to content

Instantly share code, notes, and snippets.

@topfunky
Created March 1, 2012 21:34
Show Gist options
  • Save topfunky/1953392 to your computer and use it in GitHub Desktop.
Save topfunky/1953392 to your computer and use it in GitHub Desktop.
Vows test sample
vows = require 'vows'
assert = require 'assert'
class Board
class Tour
constructor: ->
@board = new Board
suite = vows.describe('KnightsTour')
suite.addBatch
'exists':
topic: -> new Tour
'An instance is constructed': (tour) ->
assert.isObject tour
'board':
topic: (tour) -> tour.board
'exists': (board) ->
assert.isObject board
suite.export module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment