@@ -165,6 +165,33 @@ exports.removeFramework = {
165
165
test . ok ( current . indexOf ( expectedPath ) == - 1 ) ;
166
166
}
167
167
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
+
168
195
test . done ( ) ;
169
196
}
170
197
}
0 commit comments