Deprecated getAllSuites

This commit is contained in:
ragaskar
2009-09-02 07:52:11 -07:00
parent 4533d6a7cd
commit 43f819e9e2
25 changed files with 49 additions and 39 deletions

View File

@@ -153,7 +153,7 @@ describe('RunnerTest', function() {
document.runner = env.currentRunner;
var suites = env.currentRunner.getAllSuites();
var suites = env.currentRunner.suites();
var suiteDescriptions = [];
for (var i = 0; i < suites.length; i++) {
suiteDescriptions.push(suites[i].getFullName());

View File

@@ -49,7 +49,7 @@ describe('Suite', function() {
describe('SpecCount', function () {
it('should keep a count of the number of specs that are run', function() {
env.describe('one suite description', function () {
var suite = env.describe('one suite description', function () {
env.it('should be a test', function() {
this.runs(function () {
this.expect(true).toEqual(true);
@@ -67,12 +67,11 @@ describe('Suite', function() {
});
});
var suite = env.currentRunner.suites[0];
expect(suite.specCount()).toEqual(3);
});
it('specCount should be correct even with runs/waits blocks', function() {
env.describe('one suite description', function () {
var suite = env.describe('one suite description', function () {
env.it('should be a test', function() {
this.runs(function () {
this.expect(true).toEqual(true);
@@ -94,7 +93,6 @@ describe('Suite', function() {
});
});
var suite = env.currentRunner.suites[0];
expect(suite.specCount()).toEqual(3);
});
});

View File

@@ -22,7 +22,7 @@ describe("TrivialReporter", function() {
it("should display empty divs for every suite when the runner is starting", function() {
trivialReporter = new jasmine.TrivialReporter({ body: body });
trivialReporter.reportRunnerStarting({
getAllSuites: function() {
suites: function() {
return [ new jasmine.Suite({}, "suite 1", null, null) ];
}
});