aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres Ornelas2010-07-27 16:02:51 -0700
committerAndres Ornelas2010-07-27 16:02:51 -0700
commite8b477f5b1f6fcca99ea54731e7c4f09ef17b0f7 (patch)
treec0c00bfa4dbfd6bd96e2f92b4e2c98173aadc243
parent32c4aee1cdb601550e948b52a3fa7b4824cfbf1f (diff)
downloadangular.js-e8b477f5b1f6fcca99ea54731e7c4f09ef17b0f7.tar.bz2
text context extracted
-rw-r--r--test/scenario/RunnerSpec.js19
-rw-r--r--test/scenario/TestContext.js40
2 files changed, 21 insertions, 38 deletions
diff --git a/test/scenario/RunnerSpec.js b/test/scenario/RunnerSpec.js
index de7c199d..f5c152a5 100644
--- a/test/scenario/RunnerSpec.js
+++ b/test/scenario/RunnerSpec.js
@@ -1,24 +1,7 @@
describe('Runner', function() {
- var scenario, runner, log, Describe, It, $scenario, body;
-
- function logger(text) {
- return function(done){
- log += text;
- (done||noop)();
- };
- }
-
beforeEach(function() {
- log = '';
- scenario = {};
- body = _jQuery('<div></div>');
- runner = new angular.scenario.Runner(scenario, _jQuery);
- Describe = scenario.describe;
- BeforeEach = scenario.beforeEach;
- AfterEach = scenario.afterEach;
- It = scenario.it;
- $scenario = scenario.$scenario;
+ setUpContext();
});
describe('describe', function() {
diff --git a/test/scenario/TestContext.js b/test/scenario/TestContext.js
index 2081479e..7a7b41e4 100644
--- a/test/scenario/TestContext.js
+++ b/test/scenario/TestContext.js
@@ -1,20 +1,20 @@
-//var scenario, runner, log, Describe, It, $scenario, body;
-//
-//function logger(text) {
-// return function(done){
-// log += text;
-// (done||noop)();
-// };
-//}
-//
-//function beforeEach() {
-// log = '';
-// scenario = {};
-// body = _jQuery('<div></div>');
-// runner = new angular.scenario.Runner(scenario, _jQuery);
-// Describe = scenario.describe;
-// BeforeEach = scenario.beforeEach;
-// AfterEach = scenario.afterEach;
-// It = scenario.it;
-// $scenario = scenario.$scenario;
-//}
+var scenario, runner, log, $scenario, Describe, It, body;
+
+function logger(text) {
+ return function(done){
+ log += text;
+ (done||noop)();
+ };
+}
+
+function setUpContext() {
+ scenario = {};
+ runner = new angular.scenario.Runner(scenario, _jQuery);
+ $scenario = scenario.$scenario;
+ Describe = scenario.describe;
+ BeforeEach = scenario.beforeEach;
+ AfterEach = scenario.afterEach;
+ It = scenario.it;
+ log = '';
+ body = _jQuery('<div></div>');
+}