From e5c257275346e30a652174233c39959624e7ff07 Mon Sep 17 00:00:00 2001 From: Cody Sehl Date: Wed, 14 Oct 2015 21:03:47 -0600 Subject: [PATCH] Change #xit so that it will output a more BDD-style pending message --- spec/core/EnvSpec.js | 11 +++++++++++ src/core/Env.js | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/spec/core/EnvSpec.js b/spec/core/EnvSpec.js index f78efabe..3f0ecd02 100644 --- a/spec/core/EnvSpec.js +++ b/spec/core/EnvSpec.js @@ -45,4 +45,15 @@ describe("Env", function() { throwOnExpectationFailure: true })); }); + + describe('#xit', function() { + it('calls spec.pend with "Temporarily disabled with xit"', function() { + var pendSpy = jasmine.createSpy(); + spyOn(env, 'it').and.returnValue({ + pend: pendSpy + }); + env.xit(); + expect(pendSpy).toHaveBeenCalledWith('Temporarily disabled with xit'); + }); + }); }); diff --git a/src/core/Env.js b/src/core/Env.js index aad1b1dd..b70b0a06 100644 --- a/src/core/Env.js +++ b/src/core/Env.js @@ -416,7 +416,7 @@ getJasmineRequireObj().Env = function(j$) { this.xit = function() { var spec = this.it.apply(this, arguments); - spec.pend(); + spec.pend('Temporarily disabled with xit'); return spec; };