diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/scenario/DSLSpec.js | 9 | ||||
| -rw-r--r-- | test/scenario/RunnerSpec.js | 7 | ||||
| -rw-r--r-- | test/scenario/TestContext.js | 7 |
3 files changed, 12 insertions, 11 deletions
diff --git a/test/scenario/DSLSpec.js b/test/scenario/DSLSpec.js index 4d8d1075..533d34ac 100644 --- a/test/scenario/DSLSpec.js +++ b/test/scenario/DSLSpec.js @@ -1,11 +1,9 @@ describe("DSL", function() { - var scenario, runner, $scenario, lastDocument, executeFuture; + var lastDocument, executeFuture, Expect; beforeEach(function() { - scenario = {}; - runner = new angular.scenario.Runner(scenario, _jQuery); - $scenario = scenario.$scenario; + setUpContext(); executeFuture = function(future, html, callback) { lastDocument =_jQuery('<div>' + html + '</div>'); _jQuery(document.body).append(lastDocument); @@ -15,6 +13,7 @@ describe("DSL", function() { }; future.behavior.call(specThis, callback || noop); }; + Expect = scenario.expect; }); describe("input", function() { @@ -48,7 +47,7 @@ describe("DSL", function() { expect(future.name).toEqual("repeater '.repeater-row' count"); executeFuture(future, "<div class='repeater-row'>a</div>" + "<div class='repeater-row'>b</div>"); -// Expect(future).toEqual(2); + Expect(future).toEqual(2); }); }); }); diff --git a/test/scenario/RunnerSpec.js b/test/scenario/RunnerSpec.js index f5c152a5..2eb13f7f 100644 --- a/test/scenario/RunnerSpec.js +++ b/test/scenario/RunnerSpec.js @@ -1,7 +1,14 @@ describe('Runner', function() { + var Describe, It, BeforeEach, AfterEach, body; + beforeEach(function() { setUpContext(); + Describe = scenario.describe; + It = scenario.it; + BeforeEach = scenario.beforeEach; + AfterEach = scenario.afterEach; + body = _jQuery('<div></div>'); }); describe('describe', function() { diff --git a/test/scenario/TestContext.js b/test/scenario/TestContext.js index 7a7b41e4..ebb40b95 100644 --- a/test/scenario/TestContext.js +++ b/test/scenario/TestContext.js @@ -1,4 +1,4 @@ -var scenario, runner, log, $scenario, Describe, It, body; +var scenario, runner, log, $scenario; function logger(text) { return function(done){ @@ -11,10 +11,5 @@ 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>'); } |
