From 4e60bf6501dc2eb7fc3d11bd52ebfe8dcf92e88d Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Fri, 1 Feb 2013 14:46:05 -0800 Subject: [PATCH] Fix focused spec bug --- vendor/jasmine-atom-reporter.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/vendor/jasmine-atom-reporter.js b/vendor/jasmine-atom-reporter.js index d69ec1d9f..6feb1dd41 100644 --- a/vendor/jasmine-atom-reporter.js +++ b/vendor/jasmine-atom-reporter.js @@ -215,12 +215,9 @@ jasmine.AtomReporter.ReporterView = function(dom) { }; this.specStarted = function(spec) { - if (isUndefined(this.resultsMenu)) { - this.createResultsMenu(); - dom.alert.appendChild(this.resultsMenu); + if (this.currentSpecMenuItem) { + this.currentSpecMenuItem.innerHTML = spec.getFullName() } - - this.currentSpecMenuItem.innerHTML = spec.getFullName() } this.specComplete = function(spec) { @@ -259,6 +256,11 @@ jasmine.AtomReporter.ReporterView = function(dom) { }; this.refresh = function() { + if (isUndefined(this.resultsMenu)) { + this.createResultsMenu(); + dom.alert.appendChild(this.resultsMenu); + } + // summary info this.summaryMenuItem.innerHTML = "" + specPluralizedFor(this.runningSpecCount); this.detailsMenuItem.innerHTML = "" + this.failedCount + " failing";