diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 68cccadd..d19b53f0 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -918,7 +918,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; }; 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; };