From 26a6626d8fd3b6689e96efcf9ca94153f5a55388 Mon Sep 17 00:00:00 2001 From: Andre Fonseca Date: Thu, 5 Apr 2012 01:04:56 -0300 Subject: [PATCH] primeiro esqueleto de teste --- test/test.coffee | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/test.coffee diff --git a/test/test.coffee b/test/test.coffee new file mode 100644 index 0000000..9b08ac6 --- /dev/null +++ b/test/test.coffee @@ -0,0 +1,24 @@ +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) +