@@ -423,7 +423,7 @@ describe('angular', function() {
423423
424424
425425 describe ( 'directive' , function ( ) {
426- it ( 'should register directives with case-insensitive id' , function ( ) {
426+ it ( 'should register directives with case-insensitive id' , inject ( function ( $compile ) {
427427 angularDirective ( 'ALLCAPS' , function ( val , el ) { el . text ( '+' + val + '+' ) } ) ;
428428 angularDirective ( 'lowercase' , function ( val , el ) { el . text ( '-' + val + '-' ) } ) ;
429429
@@ -433,14 +433,14 @@ describe('angular', function() {
433433 '<span ALLCAPS="xx3"></span>' +
434434 '<span lowerCASE="XX4">xx4</span>' +
435435 '</div>' ) ;
436- compile ( el ) ;
436+ $ compile( el ) ;
437437 expect ( lowercase ( sortedHtml ( el ) ) ) . toBe ( '<div>' +
438438 '<span allcaps="xx1">+xx1+</span>' +
439439 '<span allcaps="xx2">+xx2+</span>' +
440440 '<span allcaps="xx3">+xx3+</span>' +
441441 '<span lowercase="xx4">-xx4-</span>' +
442442 '</div>' ) ;
443- } ) ;
443+ } ) ) ;
444444 } ) ;
445445
446446
@@ -458,25 +458,25 @@ describe('angular', function() {
458458 } ) ;
459459
460460 describe ( 'compile' , function ( ) {
461- it ( 'should link to existing node and create scope' , inject ( function ( $rootScope ) {
461+ it ( 'should link to existing node and create scope' , inject ( function ( $rootScope , $compile ) {
462462 var template = angular . element ( '<div>{{greeting = "hello world"}}</div>' ) ;
463- angular . compile ( template ) ( $rootScope ) ;
463+ $ compile( template ) ( $rootScope ) ;
464464 $rootScope . $digest ( ) ;
465465 expect ( template . text ( ) ) . toEqual ( 'hello world' ) ;
466466 expect ( $rootScope . greeting ) . toEqual ( 'hello world' ) ;
467467 } ) ) ;
468468
469- it ( 'should link to existing node and given scope' , inject ( function ( $rootScope ) {
469+ it ( 'should link to existing node and given scope' , inject ( function ( $rootScope , $compile ) {
470470 var template = angular . element ( '<div>{{greeting = "hello world"}}</div>' ) ;
471- angular . compile ( template ) ( $rootScope ) ;
471+ $ compile( template ) ( $rootScope ) ;
472472 $rootScope . $digest ( ) ;
473473 expect ( template . text ( ) ) . toEqual ( 'hello world' ) ;
474474 } ) ) ;
475475
476- it ( 'should link to new node and given scope' , inject ( function ( $rootScope ) {
476+ it ( 'should link to new node and given scope' , inject ( function ( $rootScope , $compile ) {
477477 var template = jqLite ( '<div>{{greeting = "hello world"}}</div>' ) ;
478478
479- var templateFn = angular . compile ( template ) ;
479+ var templateFn = $ compile( template ) ;
480480 var templateClone = template . clone ( ) ;
481481
482482 var element = templateFn ( $rootScope , function ( clone ) {
@@ -490,9 +490,9 @@ describe('angular', function() {
490490 expect ( $rootScope . greeting ) . toEqual ( 'hello world' ) ;
491491 } ) ) ;
492492
493- it ( 'should link to cloned node and create scope' , inject ( function ( $rootScope ) {
493+ it ( 'should link to cloned node and create scope' , inject ( function ( $rootScope , $compile ) {
494494 var template = jqLite ( '<div>{{greeting = "hello world"}}</div>' ) ;
495- var element = angular . compile ( template ) ( $rootScope , noop ) ;
495+ var element = $ compile( template ) ( $rootScope , noop ) ;
496496 $rootScope . $digest ( ) ;
497497 expect ( template . text ( ) ) . toEqual ( '' ) ;
498498 expect ( element . text ( ) ) . toEqual ( 'hello world' ) ;
0 commit comments