Permalink
Browse files

Unfuck tests

  • Loading branch information...
1 parent d63521e commit 8efe2d289599f8244d65e1ee2760e92b400ca556 mde committed Jul 23, 2012
Showing with 9 additions and 7 deletions.
  1. +5 −3 Jakefile
  2. +2 −2 test/model/create_user.js
  3. +2 −2 test/model/datatypes.js
View
@@ -59,10 +59,12 @@ task('test', function () {
t.addListener('error', function (err) {
var module
, cmd
- , errMsg = err.message;
+ , errMsg = err.message
+ , match = errMsg.match('Cannot find module')
+ , absModuleName = errMsg.match(/'[a-zA-Z]*'/);
- if (errMsg.match('Cannot find module')) {
- module = errMsg.match(/'[a-zA-Z]*'/)[0].replace(/'/g, '')
+ if (match && absModuleName) {
+ module = absModuleName[0].replace(/'/g, '');
cmd = 'npm install ' + module;
jake.logger.log(module + ' is not installed; Jake will attempt to install it for you.');
jake.exec(cmd, function () {
@@ -1,13 +1,13 @@
// Load the basic Geddy toolkit
-require('../lib/geddy');
+require('../../lib/geddy');
geddy.config = {
i18n: {
defaultLocale: 'en-us'
}
};
-var model = require('../lib/model')
+var model = require('../../lib/model')
, assert = require('assert')
, tests
, _params;
@@ -1,13 +1,13 @@
// Load the basic Geddy toolkit
-require('../lib/geddy');
+require('../../lib/geddy');
geddy.config = {
i18n: {
defaultLocale: 'en-us'
}
};
-var model = require('../lib/model')
+var model = require('../../lib/model')
, assert = require('assert')
, tests;

0 comments on commit 8efe2d2

Please sign in to comment.