Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spec runner #60

Merged
merged 1 commit into from
Dec 6, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
{
"name": "Sarah Clatterbuck",
"email": "[email protected]"
},
{
"name": "Kate Odnous",
"email": "[email protected]"
}
],
"scripts": {
Expand All @@ -44,7 +48,7 @@
},
"keywords": ["templates", "views", "helpers"],
"devDependencies": {
"jasmine-node" : "1.0.x",
"jasmine-node" : "1.9.x",
"cover" : "0.2.x",
"dustjs-linkedin": "2.2.x"
},
Expand Down
20 changes: 13 additions & 7 deletions test/jasmine-test/server/specRunner.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
var jasmine = require('jasmine-node'),
sys = require('util'),
path = require('path');
sys = require('util'),
path = require('path');

/* this should be declared global in order to access them in the spec*/
dust = require('dustjs-linkedin'),
dust.helpers = require("../../../lib/dust-helpers").helpers,
dust = require('dustjs-linkedin');
dust.helpers = require("../../../lib/dust-helpers").helpers;
helpersTests = require('../spec/helpersTests');

//Add the tapper helper to test the Tap helper.
Expand All @@ -14,7 +14,7 @@ dust.helpers.tapper = function(chunk, context, bodies, params) {
return chunk;
};

for(key in jasmine)
for(key in jasmine)
global[key] = jasmine[key];

isVerbose = true;
Expand All @@ -35,10 +35,16 @@ process.argv.forEach(function(arg) {
}
});

jasmine.executeSpecsInFolder(path.dirname(__dirname) + '/spec', (function(runner, log) {
var options = [];
options['specFolders'] = [path.dirname(__dirname) + '/spec'] ;
options['isVerbose'] = isVerbose;
options['showColors'] = showColors;
options['onComplete'] = function(runner, log) {
if (runner.results().failedCount === 0) {
return process.exit(0);
} else {
return process.exit(1);
}
}), isVerbose, showColors);
};

jasmine.executeSpecsInFolder(options);