Skip to content

Commit

Permalink
Simple test of the rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Young committed Nov 23, 2011
1 parent efb21f4 commit 08c0e5e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/rules_test.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Tests = require './tests'
assert = require 'assert'
helper = Tests.helper()
require('../src/scripts/rules') helper

tests = [
(helper) ->
helper.adapter.receive 'helper: the rules'
assert.ok helper.sent[0].match /1\. A robot may not .+/
]

until tests.length == 0
helper.sent = []
test = tests.shift()
test(helper)

helper.stop()

0 comments on commit 08c0e5e

Please sign in to comment.