diff --git a/lib/jasmine.js b/lib/jasmine.js index 899340ff..bb44280a 100644 --- a/lib/jasmine.js +++ b/lib/jasmine.js @@ -1519,9 +1519,7 @@ jasmine.QueuedFunction.prototype.next = function() { }; jasmine.QueuedFunction.prototype.safeExecute = function() { - if (this.env.reporter) { - this.env.reporter.log('>> Jasmine Running ' + this.spec.suite.description + ' ' + this.spec.description + '...'); - } + this.env.reporter.log('>> Jasmine Running ' + this.spec.suite.description + ' ' + this.spec.description + '...'); try { this.func.apply(this.spec); @@ -1626,9 +1624,7 @@ jasmine.Runner = function(env) { jasmine.util.inherit(jasmine.Runner, jasmine.ActionCollection); jasmine.Runner.prototype.finishCallback = function() { - if (this.env.reporter) { - this.env.reporter.reportRunnerResults(this); - } + this.env.reporter.reportRunnerResults(this); }; jasmine.Runner.prototype.getResults = function() { @@ -1743,9 +1739,7 @@ jasmine.Spec.prototype.resetTimeout = function() { }; jasmine.Spec.prototype.finishCallback = function() { - if (this.env.reporter) { - this.env.reporter.reportSpecResults(this); - } + this.env.reporter.reportSpecResults(this); }; jasmine.Spec.prototype.finish = function() { @@ -1873,9 +1867,7 @@ jasmine.Suite.prototype.getFullName = function() { }; jasmine.Suite.prototype.finishCallback = function() { - if (this.env.reporter) { - this.env.reporter.reportSuiteResults(this); - } + this.env.reporter.reportSuiteResults(this); }; jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) { diff --git a/spec/suites/SpyTest.js b/spec/suites/SpyTest.js index 0e8347b5..1e782fb4 100644 --- a/spec/suites/SpyTest.js +++ b/spec/suites/SpyTest.js @@ -143,7 +143,7 @@ describe('Spies', function () { }); it('calls removeAllSpies during spec finish', function() { - var test = new jasmine.Spec({}, {}, 'sample test'); + var test = new jasmine.Spec(new jasmine.Env(), {}, 'sample test'); this.spyOn(test, 'removeAllSpies'); diff --git a/src/QueuedFunction.js b/src/QueuedFunction.js index f2fc7774..e4845c38 100644 --- a/src/QueuedFunction.js +++ b/src/QueuedFunction.js @@ -24,9 +24,7 @@ jasmine.QueuedFunction.prototype.next = function() { }; jasmine.QueuedFunction.prototype.safeExecute = function() { - if (this.env.reporter) { - this.env.reporter.log('>> Jasmine Running ' + this.spec.suite.description + ' ' + this.spec.description + '...'); - } + this.env.reporter.log('>> Jasmine Running ' + this.spec.suite.description + ' ' + this.spec.description + '...'); try { this.func.apply(this.spec); diff --git a/src/Runner.js b/src/Runner.js index 22a1996e..2dfc1384 100644 --- a/src/Runner.js +++ b/src/Runner.js @@ -12,9 +12,7 @@ jasmine.Runner = function(env) { jasmine.util.inherit(jasmine.Runner, jasmine.ActionCollection); jasmine.Runner.prototype.finishCallback = function() { - if (this.env.reporter) { - this.env.reporter.reportRunnerResults(this); - } + this.env.reporter.reportRunnerResults(this); }; jasmine.Runner.prototype.getResults = function() { diff --git a/src/Spec.js b/src/Spec.js index d4d0361a..d754382f 100644 --- a/src/Spec.js +++ b/src/Spec.js @@ -103,9 +103,7 @@ jasmine.Spec.prototype.resetTimeout = function() { }; jasmine.Spec.prototype.finishCallback = function() { - if (this.env.reporter) { - this.env.reporter.reportSpecResults(this); - } + this.env.reporter.reportSpecResults(this); }; jasmine.Spec.prototype.finish = function() { diff --git a/src/Suite.js b/src/Suite.js index fe431103..60ac46c0 100644 --- a/src/Suite.js +++ b/src/Suite.js @@ -28,9 +28,7 @@ jasmine.Suite.prototype.getFullName = function() { }; jasmine.Suite.prototype.finishCallback = function() { - if (this.env.reporter) { - this.env.reporter.reportSuiteResults(this); - } + this.env.reporter.reportSuiteResults(this); }; jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {