Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (19 sloc) 603 Bytes
vows = require 'vows'
assert = require 'assert'
basket = require './carpaccio'
Basket = basket.Basket
vows
.describe("Shopping basket test")
.addBatch
'Given a new shopping basket with nothing in it':
topic: ->
new Basket 0
'when we get the value then the value of the basket is zero': (topic) ->
assert.equal topic.value, 0
.addBatch
'Given a shopping basket with $100 in it':
topic: ->
new Basket 100
'when no discount is applied then the value of the basket is $100': (topic) ->
assert.equal topic.value, 100
.export(module)