From ef4bb28be13e99f96c9ace5936cf26a174a0e5f0 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Sat, 12 Feb 2011 10:13:28 -0800 Subject: Change API angular.compile(element)([scope], [element/true]) --- test/service/invalidWidgetsSpec.js | 6 +++--- test/service/routeSpec.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'test/service') diff --git a/test/service/invalidWidgetsSpec.js b/test/service/invalidWidgetsSpec.js index b6b2da61..4a18dcf8 100644 --- a/test/service/invalidWidgetsSpec.js +++ b/test/service/invalidWidgetsSpec.js @@ -12,9 +12,9 @@ describe('$invalidWidgets', function() { it("should count number of invalid widgets", function(){ - scope = compile(''); - jqLite(document.body).append(scope.$element); - scope.$init(); + var element = jqLite('') + jqLite(document.body).append(element); + scope = compile(element)().scope; var $invalidWidgets = scope.$service('$invalidWidgets'); expect($invalidWidgets.length).toEqual(1); diff --git a/test/service/routeSpec.js b/test/service/routeSpec.js index 95258cc8..4dfa546c 100644 --- a/test/service/routeSpec.js +++ b/test/service/routeSpec.js @@ -18,7 +18,7 @@ describe('$route', function() { function BookChapter() { this.log = ''; } - scope = compile('
').$init(); + scope = compile('
')().scope; $location = scope.$service('$location'); $route = scope.$service('$route'); $route.when('/Book/:book/Chapter/:chapter', {controller: BookChapter, template:'Chapter.html'}); @@ -87,7 +87,7 @@ describe('$route', function() { $route = scope.$service('$route'), onChangeSpy = jasmine.createSpy('onChange'); - function NotFoundCtrl() {this.notFoundProp = 'not found!'} + function NotFoundCtrl() {this.notFoundProp = 'not found!';} $route.when('/foo', {template: 'foo.html'}); $route.otherwise({template: '404.html', controller: NotFoundCtrl}); -- cgit v1.2.3