Fixes #145 by adding the summary to thisRun

This commit is contained in:
robmadole 2015-01-08 11:37:01 -06:00
parent b6f1be0585
commit 7bb22be249

View File

@ -26,8 +26,6 @@ module.exports = function(grunt) {
var status = {};
var summary = [];
var symbols = {
none : {
check : '',
@ -223,6 +221,7 @@ module.exports = function(grunt) {
thisRun.passedSpecs = 0;
thisRun.failedSpecs = 0;
thisRun.skippedSpecs = 0;
thisRun.summary = [];
});
phantomjs.on('jasmine.suiteStarted', function(suiteMetaData) {
@ -286,7 +285,7 @@ module.exports = function(grunt) {
specSummary.failureMessages = specMetaData.failedExpectations.map(function(error){
return error.message;
});
summary.push({
thisRun.summary.push({
suite: suites[currentSuite].name,
name: specMetaData.description,
errors: specMetaData.failedExpectations.map(function(error){
@ -362,9 +361,9 @@ module.exports = function(grunt) {
grunt.log.writeln();
}
if(options.summary && summary.length) {
if(options.summary && thisRun.summary.length) {
grunt.log.writeln();
logSummary(summary);
logSummary(thisRun.summary);
}
if (options.junit && options.junit.path) {