@@ -35,6 +35,7 @@ describe('Directive', function () {
3535 arg : 'someArg' ,
3636 filters : [ { name : 'test' } ]
3737 } , def )
38+ d . _bind ( )
3839 // properties
3940 expect ( d . el ) . toBe ( el )
4041 expect ( d . name ) . toBe ( 'test' )
@@ -63,6 +64,7 @@ describe('Directive', function () {
6364 var d = new Directive ( 'test' , el , vm , {
6465 expression : 'a'
6566 } , def )
67+ d . _bind ( )
6668 expect ( d . _watcher ) . toBeUndefined ( )
6769 expect ( d . expression ) . toBe ( 'a' )
6870 expect ( d . bind ) . toHaveBeenCalled ( )
@@ -75,6 +77,7 @@ describe('Directive', function () {
7577 var d = new Directive ( 'test' , el , vm , {
7678 expression : '{{a}}'
7779 } , def )
80+ d . _bind ( )
7881 expect ( d . _watcher ) . toBeUndefined ( )
7982 expect ( d . expression ) . toBe ( 1 )
8083 expect ( d . bind ) . toHaveBeenCalled ( )
@@ -87,6 +90,7 @@ describe('Directive', function () {
8790 var d = new Directive ( 'test' , el , vm , {
8891 expression : '{{a}}'
8992 } , def )
93+ d . _bind ( )
9094 expect ( d . _watcher ) . toBeDefined ( )
9195 expect ( d . expression ) . toBe ( '' )
9296 expect ( def . bind ) . toHaveBeenCalled ( )
@@ -113,6 +117,7 @@ describe('Directive', function () {
113117 expression : 'a++' ,
114118 filters : [ { name : 'test' } ]
115119 } , def )
120+ d . _bind ( )
116121 expect ( d . _watcher ) . toBeUndefined ( )
117122 expect ( d . bind ) . toHaveBeenCalled ( )
118123 var wrappedFn = d . update . calls . argsFor ( 0 ) [ 0 ]
@@ -133,6 +138,7 @@ describe('Directive', function () {
133138 expression : 'a' ,
134139 filters : [ { name : 'test' } ]
135140 } , def )
141+ d . _bind ( )
136142 d . set ( 2 )
137143 expect ( vm . a ) . toBe ( 6 )
138144 nextTick ( function ( ) {
@@ -144,9 +150,10 @@ describe('Directive', function () {
144150
145151 it ( 'deep' , function ( done ) {
146152 def . deep = true
147- new Directive ( 'test' , el , vm , {
153+ var d = new Directive ( 'test' , el , vm , {
148154 expression : 'b'
149155 } , def )
156+ d . _bind ( )
150157 vm . b . c . d = 3
151158 nextTick ( function ( ) {
152159 expect ( def . update . calls . count ( ) ) . toBe ( 2 )
@@ -158,6 +165,7 @@ describe('Directive', function () {
158165 var d = new Directive ( 'test' , el , vm , {
159166 expression : 'a'
160167 } , def . update )
168+ d . _bind ( )
161169 expect ( d . update ) . toBe ( def . update )
162170 expect ( def . update ) . toHaveBeenCalled ( )
163171 } )
0 commit comments