diff options
| author | Misko Hevery | 2011-02-12 10:13:28 -0800 |
|---|---|---|
| committer | Misko Hevery | 2011-02-16 01:03:12 -0500 |
| commit | ef4bb28be13e99f96c9ace5936cf26a174a0e5f0 (patch) | |
| tree | 833057505e430cac064214ac3d55c687338da2a9 /test/CompilerSpec.js | |
| parent | 496e6bf9016d33a7cf2f4730d06a8655f01ca5cb (diff) | |
| download | angular.js-ef4bb28be13e99f96c9ace5936cf26a174a0e5f0.tar.bz2 | |
Change API angular.compile(element)([scope], [element/true])
Diffstat (limited to 'test/CompilerSpec.js')
| -rw-r--r-- | test/CompilerSpec.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/CompilerSpec.js b/test/CompilerSpec.js index 647cc366..1a93ac78 100644 --- a/test/CompilerSpec.js +++ b/test/CompilerSpec.js @@ -27,8 +27,7 @@ describe('compiler', function(){ compiler = new Compiler(markup, attrMarkup, directives, widgets); compile = function(html){ var e = jqLite("<div>" + html + "</div>"); - var scope = compiler.compile(e)(e); - return scope; + return scope = compiler.compile(e)().scope; }; }); @@ -48,7 +47,7 @@ describe('compiler', function(){ }; var template = compiler.compile(e); expect(log).toEqual("found"); - scope = template(e); + scope = template(angular.scope(), e).scope; expect(e.hasClass('ng-directive')).toEqual(true); expect(log).toEqual("found:init"); }); @@ -85,7 +84,7 @@ describe('compiler', function(){ var template = this.compile(element); return function(marker) { this.$onEval(function() { - marker.after(template(element.clone()).$element); + marker.after(template(angular.scope(), true).view); }); }; }; |
