From 2d138f1cfaa89ce07f1a54355faa08370e065045 Mon Sep 17 00:00:00 2001 From: Lee Byrd & Christian Williams Date: Tue, 22 Jun 2010 10:30:06 -0700 Subject: [PATCH] Refactor. --- src/Suite.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Suite.js b/src/Suite.js index 4837ddde..0b573523 100644 --- a/src/Suite.js +++ b/src/Suite.js @@ -51,15 +51,15 @@ jasmine.Suite.prototype.results = function() { return this.queue.results(); }; -jasmine.Suite.prototype.add = function(block) { - this.children_.push(block); - if (block instanceof jasmine.Suite) { - this.suites_.push(block); - this.env.currentRunner().addSuite(block); +jasmine.Suite.prototype.add = function(suiteOrSpec) { + this.children_.push(suiteOrSpec); + if (suiteOrSpec instanceof jasmine.Suite) { + this.suites_.push(suiteOrSpec); + this.env.currentRunner().addSuite(suiteOrSpec); } else { - this.specs_.push(block); + this.specs_.push(suiteOrSpec); } - this.queue.add(block); + this.queue.add(suiteOrSpec); }; jasmine.Suite.prototype.specs = function() {