Skip to content

Commit

Permalink
Unfuck tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mde committed Jul 23, 2012
1 parent d63521e commit 8efe2d2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions Jakefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ task('test', function () {
t.addListener('error', function (err) { t.addListener('error', function (err) {
var module var module
, cmd , 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')) { if (match && absModuleName) {
module = errMsg.match(/'[a-zA-Z]*'/)[0].replace(/'/g, '') module = absModuleName[0].replace(/'/g, '');
cmd = 'npm install ' + module; cmd = 'npm install ' + module;
jake.logger.log(module + ' is not installed; Jake will attempt to install it for you.'); jake.logger.log(module + ' is not installed; Jake will attempt to install it for you.');
jake.exec(cmd, function () { jake.exec(cmd, function () {
Expand Down
4 changes: 2 additions & 2 deletions test/model/create_user.js
Original file line number Original file line Diff line number Diff line change
@@ -1,13 +1,13 @@
// Load the basic Geddy toolkit // Load the basic Geddy toolkit
require('../lib/geddy'); require('../../lib/geddy');


geddy.config = { geddy.config = {
i18n: { i18n: {
defaultLocale: 'en-us' defaultLocale: 'en-us'
} }
}; };


var model = require('../lib/model') var model = require('../../lib/model')
, assert = require('assert') , assert = require('assert')
, tests , tests
, _params; , _params;
Expand Down
4 changes: 2 additions & 2 deletions test/model/datatypes.js
Original file line number Original file line Diff line number Diff line change
@@ -1,13 +1,13 @@
// Load the basic Geddy toolkit // Load the basic Geddy toolkit
require('../lib/geddy'); require('../../lib/geddy');


geddy.config = { geddy.config = {
i18n: { i18n: {
defaultLocale: 'en-us' defaultLocale: 'en-us'
} }
}; };


var model = require('../lib/model') var model = require('../../lib/model')
, assert = require('assert') , assert = require('assert')
, tests; , tests;


Expand Down

0 comments on commit 8efe2d2

Please sign in to comment.