From d12df0d360fe0dabdca3591654327834bee2803b Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 25 Oct 2011 22:21:21 -0700 Subject: refactor(compiler) turn compiler into a service BREAK - remove angular.compile() since the compile method is now a service and needs to be injected --- test/ScenarioSpec.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/ScenarioSpec.js') diff --git a/test/ScenarioSpec.js b/test/ScenarioSpec.js index d33e880d..986e2121 100644 --- a/test/ScenarioSpec.js +++ b/test/ScenarioSpec.js @@ -2,22 +2,22 @@ describe("ScenarioSpec: Compilation", function() { describe('compilation', function() { - it("should compile dom node and return scope", inject(function($rootScope) { + it("should compile dom node and return scope", inject(function($rootScope, $compile) { var node = jqLite('
{{b=a+1}}
')[0]; - angular.compile(node)($rootScope); + $compile(node)($rootScope); $rootScope.$digest(); expect($rootScope.a).toEqual(1); expect($rootScope.b).toEqual(2); })); - it("should compile jQuery node and return scope", inject(function($rootScope) { - var element = compile(jqLite('
{{a=123}}
'))($rootScope); + it("should compile jQuery node and return scope", inject(function($rootScope, $compile) { + var element = $compile(jqLite('
{{a=123}}
'))($rootScope); $rootScope.$digest(); expect(jqLite(element).text()).toEqual('123'); })); - it("should compile text node and return scope", inject(function($rootScope) { - var element = angular.compile('
{{a=123}}
')($rootScope); + it("should compile text node and return scope", inject(function($rootScope, $compile) { + var element = $compile('
{{a=123}}
')($rootScope); $rootScope.$digest(); expect(jqLite(element).text()).toEqual('123'); })); -- cgit v1.2.3