dwf: moved test of #explodes into SpecRunningTest.js - GREEN

This commit is contained in:
Davis W. Frank 2009-06-14 23:41:14 -07:00
parent b2cbff3bb6
commit 9928674b37
2 changed files with 6 additions and 5 deletions

View File

@ -700,7 +700,7 @@ describe("jasmine spec running", function () {
it('shouldn\'t execute specs in disabled suites', function() { it('shouldn\'t execute specs in disabled suites', function() {
var spy = jasmine.createSpy(); var spy = jasmine.createSpy();
var disabledSuite = env.xdescribe('a disabled suite', function() { var disabledSuite = env.xdescribe('a disabled suite', function() {
it('enabled spec, but should not be run', function() { env.it('enabled spec, but should not be run', function() {
spy(); spy();
}); });
}); });
@ -712,10 +712,10 @@ describe("jasmine spec running", function () {
it('#explodes should throw an exception when it is called inside a spec', function() { it('#explodes should throw an exception when it is called inside a spec', function() {
var exceptionMessage = false; var exceptionMessage = false;
var suite = env.describe('Spec', function () { var anotherSuite = env.describe('Spec', function () {
it('plodes', function() { env.it('plodes', function() {
try { try {
jasmine.explodes(); this.explodes();
} }
catch (e) { catch (e) {
exceptionMessage = e; exceptionMessage = e;
@ -723,7 +723,8 @@ describe("jasmine spec running", function () {
expect(exceptionMessage).toNotEqual(false); expect(exceptionMessage).toNotEqual(false);
}); });
}); });
suite.execute();
anotherSuite.execute();
expect(exceptionMessage).toEqual('explodes function should not have been called'); expect(exceptionMessage).toEqual('explodes function should not have been called');
}); });