From 7bb22be2495aea93dc4998f98e6bd4f70a0a7acd Mon Sep 17 00:00:00 2001 From: robmadole Date: Thu, 8 Jan 2015 11:37:01 -0600 Subject: [PATCH 1/2] Fixes #145 by adding the summary to thisRun --- tasks/jasmine.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tasks/jasmine.js b/tasks/jasmine.js index 04bf2de..71c44c8 100644 --- a/tasks/jasmine.js +++ b/tasks/jasmine.js @@ -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) { From b98974e77799cb7705a3381afc7d34a1e0337ef1 Mon Sep 17 00:00:00 2001 From: robmadole Date: Thu, 8 Jan 2015 11:42:14 -0600 Subject: [PATCH 2/2] Fix call to addMatchers in the spec helper --- test/fixtures/pivotal/spec/SpecHelper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/pivotal/spec/SpecHelper.js b/test/fixtures/pivotal/spec/SpecHelper.js index 415c543..2097166 100755 --- a/test/fixtures/pivotal/spec/SpecHelper.js +++ b/test/fixtures/pivotal/spec/SpecHelper.js @@ -1,5 +1,5 @@ beforeEach(function () { - jasmine.Expectation.addMatchers({ + jasmine.addMatchers({ toBePlaying: function () { return { compare: function (actual, expected) {