@@ -165,6 +165,33 @@ exports.removeFramework = {
165165 test . ok ( current . indexOf ( expectedPath ) == - 1 ) ;
166166 }
167167
168+ test . done ( ) ;
169+ } ,
170+ 'should remove embedded frameworks' : function ( test ) {
171+ var newFile = proj . addFramework ( '/path/to/Custom.framework' , { customFramework : true , embed :true , sign :true } ) ,
172+ frameworks = proj . pbxFrameworksBuildPhaseObj ( ) ,
173+ buildFileSection = proj . pbxBuildFileSection ( ) ,
174+ bfsLength = Object . keys ( buildFileSection ) . length ;
175+
176+ test . equal ( frameworks . files . length , 16 ) ;
177+ test . equal ( 62 , bfsLength ) ;
178+
179+ var deletedFile = proj . removeFramework ( '/path/to/Custom.framework' , { customFramework : true , embed :true } ) ,
180+ frameworks = proj . pbxFrameworksBuildPhaseObj ( ) ,
181+ buildFileSection = proj . pbxBuildFileSection ( ) ,
182+ bfsLength = Object . keys ( buildFileSection ) . length ;
183+
184+ test . equal ( frameworks . files . length , 15 ) ;
185+ test . equal ( 58 , bfsLength ) ;
186+
187+ var frameworkPaths = frameworkSearchPaths ( proj ) ;
188+ expectedPath = '"/path/to"' ;
189+
190+ for ( i = 0 ; i < frameworkPaths . length ; i ++ ) {
191+ var current = frameworkPaths [ i ] ;
192+ test . ok ( current . indexOf ( expectedPath ) == - 1 ) ;
193+ }
194+
168195 test . done ( ) ;
169196 }
170197}
0 commit comments