Created
July 10, 2010 09:15
-
-
Save manveru/470591 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iota github/manveru/kimochi % vows spec.coffee | |
✗ | |
/home/manveru/.node_libraries/.npm/vows/0.4.6/package/lib/vows/context.js:28 | |
if (e) { that.emitter.emit('error', e) } | |
^ | |
TypeError: Cannot call method 'emit' of null | |
at /home/manveru/.node_libraries/.npm/vows/0.4.6/package/lib/vows/context.js:28:47 | |
at EventEmitter._tickCallback (node.js:50:25) | |
at node.js:255:9 | |
zsh: exit 1 vows spec.coffee | |
iota github/manveru/kimochi % cat spec.coffee |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vows: require 'vows' | |
assert: require 'assert' | |
Kimochi: require './kimochi' | |
model: Kimochi.connect 'vows_spec' | |
module.exports.foo: vows.describe 'Kimochi', { | |
'A model creates the database': { | |
topic: -> model.create @callback | |
'without errors': (result) -> | |
assert.deepEqual result, {doc: {ok: true}, ok: true} | |
}}, { | |
'A model destroys the database': { | |
topic: -> model.destroy @callback | |
'without errors': (result) -> | |
assert.deepEqual result, {doc: {ok: true}, ok: true} | |
}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var Kimochi, assert, model, vows; | |
vows = require('vows'); | |
assert = require('assert'); | |
Kimochi = require('./kimochi'); | |
model = Kimochi.connect('vows_spec'); | |
module.exports.foo = vows.describe('Kimochi', { | |
'A model creates the database': { | |
topic: function() { | |
return model.create(this.callback); | |
}, | |
'without errors': function(result) { | |
return assert.deepEqual(result, { | |
doc: { | |
ok: true | |
}, | |
ok: true | |
}); | |
} | |
} | |
}, { | |
'A model destroys the database': { | |
topic: function() { | |
return model.destroy(this.callback); | |
}, | |
'without errors': function(result) { | |
return assert.deepEqual(result, { | |
doc: { | |
ok: true | |
}, | |
ok: true | |
}); | |
} | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment