@@ -11,14 +11,14 @@ module('widget factory', {
1111
1212test ( 'widget creation' , function ( ) {
1313 var myPrototype = {
14- _init : function ( ) { } ,
14+ _create : function ( ) { } ,
1515 creationTest : function ( ) { }
1616 } ;
1717
1818 $ . widget ( 'ui.testWidget' , myPrototype ) ;
1919 ok ( $ . isFunction ( $ . ui . testWidget ) , 'constructor was created' ) ;
2020 equals ( 'object' , typeof $ . ui . testWidget . prototype , 'prototype was created' ) ;
21- equals ( $ . ui . testWidget . prototype . _init , myPrototype . _init , 'init function is copied over' ) ;
21+ equals ( $ . ui . testWidget . prototype . _create , myPrototype . _create , 'create function is copied over' ) ;
2222 equals ( $ . ui . testWidget . prototype . creationTest , myPrototype . creationTest , 'random function is copied over' ) ;
2323 equals ( $ . ui . testWidget . prototype . option , $ . Widget . prototype . option , 'option method copied over from base widget' ) ;
2424} ) ;
@@ -30,7 +30,7 @@ test('jQuery usage', function() {
3030
3131 $ . widget ( 'ui.testWidget' , {
3232 getterSetterVal : 5 ,
33- _init : function ( ) {
33+ _create : function ( ) {
3434 ok ( shouldInit , 'init called on instantiation' ) ;
3535 } ,
3636 methodWithParams : function ( param1 , param2 ) {
@@ -73,7 +73,7 @@ test('direct usage', function() {
7373
7474 $ . widget ( 'ui.testWidget' , {
7575 getterSetterVal : 5 ,
76- _init : function ( ) {
76+ _create : function ( ) {
7777 ok ( shouldInit , 'init called on instantiation' ) ;
7878 } ,
7979 methodWithParams : function ( param1 , param2 ) {
@@ -113,7 +113,7 @@ test('direct usage', function() {
113113test ( 'merge multiple option arguments' , function ( ) {
114114 expect ( 1 ) ;
115115 $ . widget ( "ui.testWidget" , {
116- _init : function ( ) {
116+ _create : function ( ) {
117117 same ( this . options , {
118118 disabled : false ,
119119 option1 : "value1" ,
@@ -148,7 +148,7 @@ test('merge multiple option arguments', function() {
148148
149149test ( ".widget() - base" , function ( ) {
150150 $ . widget ( "ui.testWidget" , {
151- _init : function ( ) { }
151+ _create : function ( ) { }
152152 } ) ;
153153 var div = $ ( "<div></div>" ) . testWidget ( )
154154 same ( div [ 0 ] , div . testWidget ( "widget" ) [ 0 ] ) ;
@@ -157,7 +157,7 @@ test(".widget() - base", function() {
157157test ( ".widget() - overriden" , function ( ) {
158158 var wrapper = $ ( "<div></div>" ) ;
159159 $ . widget ( "ui.testWidget" , {
160- _init : function ( ) { } ,
160+ _create : function ( ) { } ,
161161 widget : function ( ) {
162162 return wrapper ;
163163 }
0 commit comments