diff --git a/spec/core/EnvSpec.js b/spec/core/EnvSpec.js index 7040fd98..30b5a319 100644 --- a/spec/core/EnvSpec.js +++ b/spec/core/EnvSpec.js @@ -84,21 +84,6 @@ describe("Env", function() { }); }); - describe("#catchException", function() { - it("returns true if the exception is a pending spec exception", function() { - env.catchExceptions(false); - - expect(env.catchException(new Error(j$.Spec.pendingSpecExceptionMessage))).toBe(true); - }); - - it("returns false if the exception is not a pending spec exception and not catching exceptions", function() { - env.catchExceptions(false); - - expect(env.catchException(new Error("external error"))).toBe(false); - expect(env.catchException(new Error(j$.Spec.pendingSpecExceptionMessage))).toBe(true); - }); - }); - describe("#pending", function() { it("throws the Pending Spec exception", function() { expect(function() { @@ -422,7 +407,6 @@ describe("Env integration", function() { }); var suiteResult = reporter.suiteStarted.calls.first().args[0]; expect(suiteResult.description).toEqual("A Suite"); - expect(reporter.jasmineDone).toHaveBeenCalled(); done(); }); diff --git a/src/core/Env.js b/src/core/Env.js index 62ce9e03..c5ec52c5 100644 --- a/src/core/Env.js +++ b/src/core/Env.js @@ -116,10 +116,6 @@ getJasmineRequireObj().Env = function(j$) { return catchExceptions; }; - this.catchException = function(e) { - return j$.Spec.isPendingSpecException(e) || catchExceptions; - }; - var maximumSpecCallbackDepth = 20; var currentSpecCallbackDepth = 0; @@ -133,8 +129,12 @@ getJasmineRequireObj().Env = function(j$) { } } + var catchException = function(e) { + return j$.Spec.isPendingSpecException(e) || catchExceptions; + }; + var queueRunnerFactory = function(options) { - options.catchException = self.catchException; + options.catchException = catchException; options.clearStack = options.clearStack || clearStack; new j$.QueueRunner(options).execute();