diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 5c543254..c605058b 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -634,8 +634,8 @@ getJasmineRequireObj().Env = function(j$) { resultCallback: function(attrs) { if (!suite.disabled) { clearResourcesForRunnable(suite.id); - currentlyExecutingSuites.pop(); } + currentlyExecutingSuites.pop(); reporter.suiteDone(attrs); } }); diff --git a/spec/core/integration/EnvSpec.js b/spec/core/integration/EnvSpec.js index 6d7c9bb0..ea643178 100644 --- a/spec/core/integration/EnvSpec.js +++ b/spec/core/integration/EnvSpec.js @@ -1122,6 +1122,43 @@ describe("Env integration", function() { env.execute(); }); + it('should report xdescribes as expected', function(done) { + var env = new j$.Env(), + reporter = jasmine.createSpyObj('fakeReporter', [ + "jasmineStarted", + "jasmineDone", + "suiteStarted", + "suiteDone", + "specStarted", + "specDone" + ]); + + reporter.jasmineDone.and.callFake(function() { + expect(reporter.jasmineStarted).toHaveBeenCalledWith({ + totalSpecsDefined: 1 + }); + + expect(reporter.specDone).not.toHaveBeenCalled(); + expect(reporter.suiteDone.calls.count()).toBe(3); + + done(); + }); + + env.addReporter(reporter); + + env.describe("A Suite", function() { + env.describe("nested", function() { + env.xdescribe("xd out", function() { + env.it("with a spec", function() { + env.expect(true).toBe(false); + }); + }); + }); + }); + + env.execute(); + }); + it("should be possible to get full name from a spec", function() { var env = new j$.Env({global: { setTimeout: setTimeout }}), topLevelSpec, nestedSpec, doublyNestedSpec; diff --git a/src/core/Env.js b/src/core/Env.js index f6c263f3..18dce14a 100644 --- a/src/core/Env.js +++ b/src/core/Env.js @@ -240,8 +240,8 @@ getJasmineRequireObj().Env = function(j$) { resultCallback: function(attrs) { if (!suite.disabled) { clearResourcesForRunnable(suite.id); - currentlyExecutingSuites.pop(); } + currentlyExecutingSuites.pop(); reporter.suiteDone(attrs); } });