File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
spec/javascripts/src/core Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,25 @@ describe('entity', function(){
185185 ok ( e . parent ( '' , 'has' , c . name ) )
186186 } )
187187
188+ it ( 'attr overwrite method' , function ( ) {
189+
190+ var called = false ;
191+
192+ e . attr ( {
193+ blah :function ( ) { }
194+ } ) ;
195+
196+ e . attr ( {
197+ blah :function ( ) {
198+ called = true ;
199+ }
200+ } ) ;
201+
202+ e . blah ( ) ;
203+
204+ ok ( called ) ;
205+ } ) ;
206+
188207 it ( 'should dispose of all components properly' , function ( ) {
189208 var called = false , called2 = false ;
190209
Original file line number Diff line number Diff line change 446446 }
447447
448448 } else {
449+ var k = 'function' ;
449450 //defines property
450- if ( re . is ( this [ obj ] , 'function' ) && ! re . is ( value , 'function' ) ) {
451+ if ( re . is ( this [ obj ] , k ) && ! re . is ( value , k ) ) {
451452 if ( re . is ( value , 'array' ) ) {
452453 this [ obj ] . apply ( this , value ) ;
453454 } else {
You can’t perform that action at this time.
0 commit comments