Only clear resources if suite is not disabled

[#66789174]
This commit is contained in:
Christopher Amavisca and Greg Cobb
2014-03-05 14:00:57 -08:00
parent 752a36d3ff
commit b200952195
7 changed files with 363 additions and 139 deletions
+1 -2
View File
@@ -80,7 +80,7 @@ describe("Env integration", function() {
env.describe("Outer suite", function() {
env.it("an outer spec", function() {
calls.push('an outer spec')
calls.push('an outer spec');
});
env.describe("Inner suite", function() {
env.it("an inner spec", function() {
@@ -803,4 +803,3 @@ describe("Env integration", function() {
env.execute();
});
});
+23
View File
@@ -244,6 +244,29 @@ describe("jasmine spec running", function () {
env.addReporter({jasmineDone: assertions});
env.execute();
});
it("should allow top level suites to be disabled", function() {
var specInADisabledSuite = jasmine.createSpy("specInADisabledSuite"),
otherSpec = jasmine.createSpy("otherSpec");
env.xdescribe('A disabled suite', function() {
env.it('spec inside a disabled suite', specInADisabledSuite);
});
env.describe('Another suite', function() {
env.it('another spec', otherSpec);
});
var assertions = function() {
expect(specInADisabledSuite).not.toHaveBeenCalled();
expect(otherSpec).toHaveBeenCalled();
done();
};
env.addReporter({jasmineDone: assertions});
env.execute();
});
it("should set all pending specs to pending when a suite is run", function(done) {
var pendingSpec,