From 7c11531902986405e9443c30dd0c654f86c31ca3 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 3 Nov 2011 13:53:37 -0700 Subject: refactor(parser): turn parser into a service (keep compatibility hack) --- test/service/parseSpec.js | 6 +++--- test/testabilityPatch.js | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/service/parseSpec.js b/test/service/parseSpec.js index ce3b22ca..5045ec9e 100644 --- a/test/service/parseSpec.js +++ b/test/service/parseSpec.js @@ -413,12 +413,12 @@ describe('parser', function() { describe('assignable', function() { - it('should expose assignment function', function() { - var fn = parser('a').assignable(); + it('should expose assignment function', inject(function($parse) { + var fn = $parse('a'); expect(fn.assign).toBeTruthy(); var scope = {}; fn.assign(scope, 123); expect(scope).toEqual({a:123}); - }); + })); }); }); diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js index 4d576ab9..96deac5a 100644 --- a/test/testabilityPatch.js +++ b/test/testabilityPatch.js @@ -49,8 +49,6 @@ function dumpScope(scope, offset) { publishExternalAPI(angular) beforeEach(function() { publishExternalAPI(angular) - // This is to reset parsers global cache of expressions. - compileCache = {}; // workaround for IE bug https://plus.google.com/104744871076396904202/posts/Kqjuj6RSbbT // IE overwrite window.jQuery with undefined because of empty jQuery var statement, so we have to -- cgit v1.2.3