diff --git a/spec/core/integration/SpecRunningSpec.js b/spec/core/integration/SpecRunningSpec.js index 9950f722..2028509a 100644 --- a/spec/core/integration/SpecRunningSpec.js +++ b/spec/core/integration/SpecRunningSpec.js @@ -915,48 +915,36 @@ describe("jasmine spec running", function () { env.execute(); }); - describe("When an async function times out", function() { - beforeEach(function() { - jasmine.clock().install(); - env = new jasmineUnderTest.Env(); - }); + it("skips to cleanup functions when an async function times out", function(done) { + var actions = []; - afterEach(function() { - jasmine.clock().uninstall(); - }); + env.describe('Something', function() { + env.beforeEach(function(innerDone) { + actions.push('beforeEach'); + }, 1); - it("skips to cleanup functions", function(done) { - var actions = []; - - env.describe('Something', function() { - env.beforeEach(function(done) { - actions.push('beforeEach'); - }); - - env.afterEach(function() { - actions.push('afterEach'); - }); - - env.it('does it' , function() { - actions.push('it'); - }); + env.afterEach(function() { + actions.push('afterEach'); }); - env.throwOnExpectationFailure(true); - - var assertions = function() { - expect(actions).toEqual([ - 'beforeEach', - 'afterEach' - ]); - done(); - }; - - env.addReporter({jasmineDone: assertions}); - - env.execute(); - jasmine.clock().tick(jasmineUnderTest.DEFAULT_TIMEOUT_INTERVAL); + env.it('does it' , function() { + actions.push('it'); + }); }); + + env.throwOnExpectationFailure(true); + + var assertions = function() { + expect(actions).toEqual([ + 'beforeEach', + 'afterEach' + ]); + done(); + }; + + env.addReporter({jasmineDone: assertions}); + + env.execute(); }); }); });