@@ -15,7 +15,7 @@ final class XcodeTemplatesTests: XCTestCase {
15
15
writes. forEach { assertSnapshot ( of: $0. contents, as: . lines, named: " Contents. \( name ( from: $0. path) ) " ) }
16
16
assertSnapshot ( of: writes. map { ( path: $0. path, atomically: $0. atomically) } , as: . dump, named: " Writes " )
17
17
assertSnapshot ( of: fileSystem. directories, as: . dump, named: " Directories " )
18
- assertSnapshot ( of: fileSystem. copies, as: . dump, named: " Copies " )
18
+ assertSnapshot ( of: sanitize ( fileSystem. copies) , as: . dump, named: " Copies " )
19
19
assertSnapshot ( of: fileSystem. deletions, as: . dump, named: " Deletions " )
20
20
}
21
21
@@ -28,7 +28,7 @@ final class XcodeTemplatesTests: XCTestCase {
28
28
writes. forEach { assertSnapshot ( of: $0. contents, as: . lines, named: " Contents. \( name ( from: $0. path) ) " ) }
29
29
assertSnapshot ( of: writes. map { ( path: $0. path, atomically: $0. atomically) } , as: . dump, named: " Writes " )
30
30
assertSnapshot ( of: fileSystem. directories, as: . dump, named: " Directories " )
31
- assertSnapshot ( of: fileSystem. copies, as: . dump, named: " Copies " )
31
+ assertSnapshot ( of: sanitize ( fileSystem. copies) , as: . dump, named: " Copies " )
32
32
assertSnapshot ( of: fileSystem. deletions, as: . dump, named: " Deletions " )
33
33
}
34
34
@@ -41,6 +41,15 @@ final class XcodeTemplatesTests: XCTestCase {
41
41
. replacingOccurrences ( of: [ " .xctemplate " , " ___FILEBASENAME___ " , " .swift " , " .plist " ] , with: " " )
42
42
}
43
43
44
+ private func sanitize( _ copies: [ ( from: String , to: String ) ] ) -> [ ( from: String , to: String ) ] {
45
+ // swiftlint:disable:next identifier_name
46
+ copies. map { from, to in
47
+ let from : String = from. replacingOccurrences ( of: " /Contents/Resources " , with: " " )
48
+ let bundle : String = " Nodes_NodesXcodeTemplatesGenerator "
49
+ return ( from: from. components ( separatedBy: bundle) . last!, to: to)
50
+ }
51
+ }
52
+
44
53
private func givenConfig( ) -> Config {
45
54
var config : Config = . init( )
46
55
config. uiFrameworks = [
0 commit comments