From 48697a2b86dbb12ea8de64cc5fece7caf68b321e Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Mon, 17 Oct 2011 16:56:56 -0700 Subject: 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 --- example/personalLog/test/personalLogSpec.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'example/personalLog') diff --git a/example/personalLog/test/personalLogSpec.js b/example/personalLog/test/personalLogSpec.js index 3e6935a3..cf80a420 100644 --- a/example/personalLog/test/personalLogSpec.js +++ b/example/personalLog/test/personalLogSpec.js @@ -2,8 +2,9 @@ describe('example.personalLog.LogCtrl', function() { var logCtrl; function createNotesCtrl() { - var scope = angular.scope(); - scope.$cookies = scope.$service('$cookies'); + var injector = angular.injector(); + var scope = injector('$rootScope'); + scope.$cookies = injector('$cookies'); return scope.$new(example.personalLog.LogCtrl); } -- cgit v1.2.3