diff options
| author | Misko Hevery | 2011-10-17 16:56:56 -0700 |
|---|---|---|
| committer | Misko Hevery | 2011-11-14 16:39:31 -0800 |
| commit | 48697a2b86dbb12ea8de64cc5fece7caf68b321e (patch) | |
| tree | 1fa50659f0bb5de2640dea2a2e5bb5628f2bb14a /test/scenario/SpecRunnerSpec.js | |
| parent | 93b777c916ccff243c5a6080bf5f39860ac7bf39 (diff) | |
| download | angular.js-48697a2b86dbb12ea8de64cc5fece7caf68b321e.tar.bz2 | |
refactor(injector): turn scope into a service
- turn scope into a $rootScope service.
- injector is now a starting point for creating angular application.
- added inject() method which wraps jasmine its/beforeEach/afterEach,
and which allows configuration and injection of services.
- refactor tests to use inject() where possible
BREAK:
- removed angular.scope() method
Diffstat (limited to 'test/scenario/SpecRunnerSpec.js')
| -rw-r--r-- | test/scenario/SpecRunnerSpec.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/scenario/SpecRunnerSpec.js b/test/scenario/SpecRunnerSpec.js index 92f000ba..4cffc63a 100644 --- a/test/scenario/SpecRunnerSpec.js +++ b/test/scenario/SpecRunnerSpec.js @@ -25,13 +25,13 @@ describe('angular.scenario.SpecRunner', function() { }; } - beforeEach(function() { + beforeEach(inject(function($rootScope) { log = []; $window = {}; $window.setTimeout = function(fn, timeout) { fn(); }; - $root = angular.scope(); + $root = $rootScope; $root.emit = function(eventName) { log.push(eventName); }; @@ -41,7 +41,7 @@ describe('angular.scenario.SpecRunner', function() { $root.application = new ApplicationMock($window); $root.$window = $window; runner = $root.$new(angular.scenario.SpecRunner); - }); + })); it('should bind futures to the spec', function() { runner.addFuture('test future', function(done) { |
