More clearly differentiate between spec and suite ids

This commit is contained in:
Sheel Choksi
2013-07-29 22:04:08 -07:00
parent 66010d01ec
commit d60786a06c
4 changed files with 13 additions and 13 deletions

View File

@@ -629,12 +629,12 @@ getJasmineRequireObj().Env = function(j$) {
// TODO: move this to closure
Env.prototype.nextSpecId = function() {
return this.nextSpecId_++;
return 'spec' + this.nextSpecId_++;
};
// TODO: move this to closure
Env.prototype.nextSuiteId = function() {
return this.nextSuiteId_++;
return 'suite' + this.nextSuiteId_++;
};
// TODO: move this to closure

View File

@@ -8,9 +8,9 @@ describe("Env", function() {
describe('ids', function() {
it('nextSpecId should return consecutive integers, starting at 0', function() {
expect(env.nextSpecId()).toEqual(0);
expect(env.nextSpecId()).toEqual(1);
expect(env.nextSpecId()).toEqual(2);
expect(env.nextSpecId()).toEqual('spec0');
expect(env.nextSpecId()).toEqual('spec1');
expect(env.nextSpecId()).toEqual('spec2');
});
});

View File

@@ -25,11 +25,11 @@ describe("jasmine spec running", function () {
});
});
expect(it0.id).toEqual(0);
expect(it1.id).toEqual(1);
expect(it2.id).toEqual(2);
expect(it3.id).toEqual(3);
expect(it4.id).toEqual(4);
expect(it0.id).toEqual('spec0');
expect(it1.id).toEqual('spec1');
expect(it2.id).toEqual('spec2');
expect(it3.id).toEqual('spec3');
expect(it4.id).toEqual('spec4');
});
it('nested suites', function (done) {
@@ -305,4 +305,4 @@ describe("jasmine spec running", function () {
));
});
});
});

View File

@@ -259,12 +259,12 @@ getJasmineRequireObj().Env = function(j$) {
// TODO: move this to closure
Env.prototype.nextSpecId = function() {
return this.nextSpecId_++;
return 'spec' + this.nextSpecId_++;
};
// TODO: move this to closure
Env.prototype.nextSuiteId = function() {
return this.nextSuiteId_++;
return 'suite' + this.nextSuiteId_++;
};
// TODO: move this to closure