Skip to content

Commit cc022a6

Browse files
authored
[Infra] Add tear down logic in set up code (#11029)
1 parent 35ed477 commit cc022a6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Crashlytics/UnitTests/FIRCLSReportManagerTests.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ - (void)setUp {
7878

7979
self.fileManager = [[FIRCLSTempMockFileManager alloc] init];
8080

81+
// Cleanup potential artifacts from other test files.
82+
if ([[NSFileManager defaultManager] fileExistsAtPath:[self.fileManager rootPath]]) {
83+
assert([self.fileManager removeItemAtPath:[self.fileManager rootPath]]);
84+
}
85+
8186
// Delete cached settings
8287
[self.fileManager removeItemAtPath:_fileManager.settingsFilePath];
8388

0 commit comments

Comments
 (0)