Refactor.

This commit is contained in:
Lee Byrd & Christian Williams 2010-06-22 10:30:06 -07:00
parent e30b99e7b3
commit 2d138f1cfa
1 changed files with 7 additions and 7 deletions

View File

@ -51,15 +51,15 @@ jasmine.Suite.prototype.results = function() {
return this.queue.results(); return this.queue.results();
}; };
jasmine.Suite.prototype.add = function(block) { jasmine.Suite.prototype.add = function(suiteOrSpec) {
this.children_.push(block); this.children_.push(suiteOrSpec);
if (block instanceof jasmine.Suite) { if (suiteOrSpec instanceof jasmine.Suite) {
this.suites_.push(block); this.suites_.push(suiteOrSpec);
this.env.currentRunner().addSuite(block); this.env.currentRunner().addSuite(suiteOrSpec);
} else { } else {
this.specs_.push(block); this.specs_.push(suiteOrSpec);
} }
this.queue.add(block); this.queue.add(suiteOrSpec);
}; };
jasmine.Suite.prototype.specs = function() { jasmine.Suite.prototype.specs = function() {