diff options
| -rw-r--r-- | test/scenario/RunnerSpec.js | 19 | ||||
| -rw-r--r-- | test/scenario/TestContext.js | 40 | 
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>'); +}  | 
