require.paths.push("./lib"); require.paths.push("./vendor/jasmine-node/lib"); var jasmine = require('jasmine'); var sys = require('sys'); for(var key in jasmine) { global[key] = jasmine[key]; } var isVerbose = false; var showColors = true; process.argv.forEach(function(arg){ switch(arg) { case '--color': showColors = true; break; case '--noColor': showColors = false; break; case '--verbose': isVerbose = true; break; } }); jasmine.executeSpecsInFolder(__dirname + '/spec', function(runner, log){ if (runner.results().failedCount == 0) { process.exit(0); } else { process.exit(1); } }, isVerbose, showColors);
// require.paths.push("./lib"); Completely removed on node 0.6.0 var jasmine = require('jasmine'); var sys = require('util'); for(var key in jasmine) { global[key] = jasmine[key]; } var isVerbose = true; var showColors = true; process.argv.forEach(function(arg){ switch(arg) { case '--color': showColors = true; break; case '--noColor': showColors = false; break; case '--verbose': isVerbose = true; break; } }); // Have to hack the directory here. not sure why. jasmine.executeSpecsInFolder(__dirname + '/../javascripts', function(runner, log){ process.exit(runner.results().failedCount); }, isVerbose, showColors);