Skip to content

Commit 81d9ee0

Browse files
Add abstract target to share tests dependencies
- Since we’re using Quick/Nimble on unit tests, it would be good to have it on UI Tests too
1 parent 35325d4 commit 81d9ee0

File tree

2 files changed

+75
-5
lines changed

2 files changed

+75
-5
lines changed

Podfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ target 'SwiftWeather' do
55
pod 'SwiftyJSON'
66
end
77

8-
target 'SwiftWeatherTests' do
8+
abstract_target 'Tests' do
99
pod 'Quick'
1010
pod 'Nimble'
11+
12+
target 'SwiftWeatherTests'
13+
target 'SwiftWeatherUITests'
1114
end
1215

16+

SwiftWeather.xcodeproj/project.pbxproj

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
1E8FF8444E2C29BD30B867EF /* Pods_Tests_SwiftWeatherUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 418594A8DD8093A647A30E12 /* Pods_Tests_SwiftWeatherUITests.framework */; };
1011
2243FE9A2727187E86FF04FC /* Pods_SwiftWeatherTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4717075E21C23E8584AC2FB9 /* Pods_SwiftWeatherTests.framework */; };
1112
5120F2EFC3DE077315306794 /* Pods_SwiftWeather.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF971A1BA4A6D64984CB0A75 /* Pods_SwiftWeather.framework */; };
13+
655E8966C3E09626A8221261 /* Pods_Tests_SwiftWeatherTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 342A91306F3CF92DD999C97D /* Pods_Tests_SwiftWeatherTests.framework */; };
1214
AE09C4301B9723DE00C7CCED /* LocationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE09C42F1B9723DE00C7CCED /* LocationService.swift */; };
1315
AE0DC2CD1B8E7B3900E67147 /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE0DC2CC1B8E7B3900E67147 /* Observable.swift */; };
1416
AE26CCAB1B875C2400D518CB /* ForecastView.xib in Resources */ = {isa = PBXBuildFile; fileRef = AE26CCAA1B875C2400D518CB /* ForecastView.xib */; };
@@ -59,9 +61,13 @@
5961

6062
/* Begin PBXFileReference section */
6163
2B08B7D462F3A98915CC2445 /* Pods-SwiftWeatherTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftWeatherTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftWeatherTests/Pods-SwiftWeatherTests.release.xcconfig"; sourceTree = "<group>"; };
64+
342A91306F3CF92DD999C97D /* Pods_Tests_SwiftWeatherTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Tests_SwiftWeatherTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
65+
418594A8DD8093A647A30E12 /* Pods_Tests_SwiftWeatherUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Tests_SwiftWeatherUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6266
4717075E21C23E8584AC2FB9 /* Pods_SwiftWeatherTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftWeatherTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
67+
53EEE101C82E858E57980710 /* Pods-Tests-SwiftWeatherUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests-SwiftWeatherUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Tests-SwiftWeatherUITests/Pods-Tests-SwiftWeatherUITests.release.xcconfig"; sourceTree = "<group>"; };
6368
5F7BA3CA9A631826379B2C68 /* Pods-SwiftWeatherTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftWeatherTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftWeatherTests/Pods-SwiftWeatherTests.debug.xcconfig"; sourceTree = "<group>"; };
6469
900AFFBB41C69FC277CB0A33 /* Pods-SwiftWeather.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftWeather.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftWeather/Pods-SwiftWeather.debug.xcconfig"; sourceTree = "<group>"; };
70+
919B9EF9E5898277AD9C772A /* Pods-Tests-SwiftWeatherUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests-SwiftWeatherUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Tests-SwiftWeatherUITests/Pods-Tests-SwiftWeatherUITests.debug.xcconfig"; sourceTree = "<group>"; };
6571
AE09C42F1B9723DE00C7CCED /* LocationService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocationService.swift; sourceTree = "<group>"; };
6672
AE0DC2CC1B8E7B3900E67147 /* Observable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Observable.swift; sourceTree = "<group>"; };
6773
AE26CCAA1B875C2400D518CB /* ForecastView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ForecastView.xib; sourceTree = "<group>"; };
@@ -89,6 +95,7 @@
8995
AEEDF68C1B9F9B2900C6067B /* Temperature.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Temperature.swift; sourceTree = "<group>"; };
9096
AEF61B271BA23B1200E8F259 /* ForecastDateTime.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ForecastDateTime.swift; sourceTree = "<group>"; };
9197
BF971A1BA4A6D64984CB0A75 /* Pods_SwiftWeather.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftWeather.framework; sourceTree = BUILT_PRODUCTS_DIR; };
98+
BFCBC7111E6F5822A73508A5 /* Pods-Tests-SwiftWeatherTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests-SwiftWeatherTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Tests-SwiftWeatherTests/Pods-Tests-SwiftWeatherTests.debug.xcconfig"; sourceTree = "<group>"; };
9299
CAB56A3D23F4A93BB599E4BA /* WeatherServiceProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WeatherServiceProtocol.swift; sourceTree = "<group>"; };
93100
CAB56D46471CA243B1FD646F /* OpenWeatherMapService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenWeatherMapService.swift; sourceTree = "<group>"; };
94101
E835C39D4B929F35B6A57B12 /* Pods-SwiftWeather.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftWeather.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftWeather/Pods-SwiftWeather.release.xcconfig"; sourceTree = "<group>"; };
@@ -99,6 +106,7 @@
99106
F3897F811C118F0A001609E2 /* TemperatureSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TemperatureSpec.swift; sourceTree = "<group>"; };
100107
F3897F831C11911B001609E2 /* WeatherIconSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WeatherIconSpec.swift; sourceTree = "<group>"; };
101108
F3FADA1A1C1327CB006D8551 /* WeatherBuilderSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WeatherBuilderSpec.swift; sourceTree = "<group>"; };
109+
F4007F80070D3AAE1C564D8D /* Pods-Tests-SwiftWeatherTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests-SwiftWeatherTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Tests-SwiftWeatherTests/Pods-Tests-SwiftWeatherTests.release.xcconfig"; sourceTree = "<group>"; };
102110
/* End PBXFileReference section */
103111

104112
/* Begin PBXFrameworksBuildPhase section */
@@ -115,13 +123,15 @@
115123
buildActionMask = 2147483647;
116124
files = (
117125
2243FE9A2727187E86FF04FC /* Pods_SwiftWeatherTests.framework in Frameworks */,
126+
655E8966C3E09626A8221261 /* Pods_Tests_SwiftWeatherTests.framework in Frameworks */,
118127
);
119128
runOnlyForDeploymentPostprocessing = 0;
120129
};
121130
AECBA5FE1B836BF20004A536 /* Frameworks */ = {
122131
isa = PBXFrameworksBuildPhase;
123132
buildActionMask = 2147483647;
124133
files = (
134+
1E8FF8444E2C29BD30B867EF /* Pods_Tests_SwiftWeatherUITests.framework in Frameworks */,
125135
);
126136
runOnlyForDeploymentPostprocessing = 0;
127137
};
@@ -133,6 +143,8 @@
133143
children = (
134144
BF971A1BA4A6D64984CB0A75 /* Pods_SwiftWeather.framework */,
135145
4717075E21C23E8584AC2FB9 /* Pods_SwiftWeatherTests.framework */,
146+
342A91306F3CF92DD999C97D /* Pods_Tests_SwiftWeatherTests.framework */,
147+
418594A8DD8093A647A30E12 /* Pods_Tests_SwiftWeatherUITests.framework */,
136148
);
137149
name = Frameworks;
138150
sourceTree = "<group>";
@@ -278,6 +290,10 @@
278290
E835C39D4B929F35B6A57B12 /* Pods-SwiftWeather.release.xcconfig */,
279291
5F7BA3CA9A631826379B2C68 /* Pods-SwiftWeatherTests.debug.xcconfig */,
280292
2B08B7D462F3A98915CC2445 /* Pods-SwiftWeatherTests.release.xcconfig */,
293+
BFCBC7111E6F5822A73508A5 /* Pods-Tests-SwiftWeatherTests.debug.xcconfig */,
294+
F4007F80070D3AAE1C564D8D /* Pods-Tests-SwiftWeatherTests.release.xcconfig */,
295+
919B9EF9E5898277AD9C772A /* Pods-Tests-SwiftWeatherUITests.debug.xcconfig */,
296+
53EEE101C82E858E57980710 /* Pods-Tests-SwiftWeatherUITests.release.xcconfig */,
281297
);
282298
name = Pods;
283299
sourceTree = "<group>";
@@ -344,9 +360,12 @@
344360
isa = PBXNativeTarget;
345361
buildConfigurationList = AECBA6101B836BF20004A536 /* Build configuration list for PBXNativeTarget "SwiftWeatherUITests" */;
346362
buildPhases = (
363+
7E7F83383B6114FE2CC03BD6 /* [CP] Check Pods Manifest.lock */,
347364
AECBA5FD1B836BF20004A536 /* Sources */,
348365
AECBA5FE1B836BF20004A536 /* Frameworks */,
349366
AECBA5FF1B836BF20004A536 /* Resources */,
367+
EC9ED72913B1DE182823A53C /* [CP] Embed Pods Frameworks */,
368+
1B9DE6A0CE065E744D7CB96E /* [CP] Copy Pods Resources */,
350369
);
351370
buildRules = (
352371
);
@@ -434,6 +453,21 @@
434453
/* End PBXResourcesBuildPhase section */
435454

436455
/* Begin PBXShellScriptBuildPhase section */
456+
1B9DE6A0CE065E744D7CB96E /* [CP] Copy Pods Resources */ = {
457+
isa = PBXShellScriptBuildPhase;
458+
buildActionMask = 2147483647;
459+
files = (
460+
);
461+
inputPaths = (
462+
);
463+
name = "[CP] Copy Pods Resources";
464+
outputPaths = (
465+
);
466+
runOnlyForDeploymentPostprocessing = 0;
467+
shellPath = /bin/sh;
468+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Tests-SwiftWeatherUITests/Pods-Tests-SwiftWeatherUITests-resources.sh\"\n";
469+
showEnvVarsInLog = 0;
470+
};
437471
2A25B97139655BE3B502C748 /* [CP] Check Pods Manifest.lock */ = {
438472
isa = PBXShellScriptBuildPhase;
439473
buildActionMask = 2147483647;
@@ -469,7 +503,7 @@
469503
);
470504
runOnlyForDeploymentPostprocessing = 0;
471505
shellPath = /bin/sh;
472-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftWeatherTests/Pods-SwiftWeatherTests-frameworks.sh\"\n";
506+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Tests-SwiftWeatherTests/Pods-Tests-SwiftWeatherTests-frameworks.sh\"\n";
473507
showEnvVarsInLog = 0;
474508
};
475509
32518075271F3E332F6C65A9 /* [CP] Copy Pods Resources */ = {
@@ -505,6 +539,21 @@
505539
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftWeather/Pods-SwiftWeather-frameworks.sh\"\n";
506540
showEnvVarsInLog = 0;
507541
};
542+
7E7F83383B6114FE2CC03BD6 /* [CP] Check Pods Manifest.lock */ = {
543+
isa = PBXShellScriptBuildPhase;
544+
buildActionMask = 2147483647;
545+
files = (
546+
);
547+
inputPaths = (
548+
);
549+
name = "[CP] Check Pods Manifest.lock";
550+
outputPaths = (
551+
);
552+
runOnlyForDeploymentPostprocessing = 0;
553+
shellPath = /bin/sh;
554+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
555+
showEnvVarsInLog = 0;
556+
};
508557
875372B40EF6130AA88D65AB /* [CP] Check Pods Manifest.lock */ = {
509558
isa = PBXShellScriptBuildPhase;
510559
buildActionMask = 2147483647;
@@ -548,7 +597,22 @@
548597
);
549598
runOnlyForDeploymentPostprocessing = 0;
550599
shellPath = /bin/sh;
551-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftWeatherTests/Pods-SwiftWeatherTests-resources.sh\"\n";
600+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Tests-SwiftWeatherTests/Pods-Tests-SwiftWeatherTests-resources.sh\"\n";
601+
showEnvVarsInLog = 0;
602+
};
603+
EC9ED72913B1DE182823A53C /* [CP] Embed Pods Frameworks */ = {
604+
isa = PBXShellScriptBuildPhase;
605+
buildActionMask = 2147483647;
606+
files = (
607+
);
608+
inputPaths = (
609+
);
610+
name = "[CP] Embed Pods Frameworks";
611+
outputPaths = (
612+
);
613+
runOnlyForDeploymentPostprocessing = 0;
614+
shellPath = /bin/sh;
615+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Tests-SwiftWeatherUITests/Pods-Tests-SwiftWeatherUITests-frameworks.sh\"\n";
552616
showEnvVarsInLog = 0;
553617
};
554618
/* End PBXShellScriptBuildPhase section */
@@ -768,7 +832,7 @@
768832
};
769833
AECBA60E1B836BF20004A536 /* Debug */ = {
770834
isa = XCBuildConfiguration;
771-
baseConfigurationReference = 5F7BA3CA9A631826379B2C68 /* Pods-SwiftWeatherTests.debug.xcconfig */;
835+
baseConfigurationReference = BFCBC7111E6F5822A73508A5 /* Pods-Tests-SwiftWeatherTests.debug.xcconfig */;
772836
buildSettings = {
773837
BUNDLE_LOADER = "$(TEST_HOST)";
774838
CLANG_ENABLE_MODULES = YES;
@@ -786,7 +850,7 @@
786850
};
787851
AECBA60F1B836BF20004A536 /* Release */ = {
788852
isa = XCBuildConfiguration;
789-
baseConfigurationReference = 2B08B7D462F3A98915CC2445 /* Pods-SwiftWeatherTests.release.xcconfig */;
853+
baseConfigurationReference = F4007F80070D3AAE1C564D8D /* Pods-Tests-SwiftWeatherTests.release.xcconfig */;
790854
buildSettings = {
791855
BUNDLE_LOADER = "$(TEST_HOST)";
792856
CLANG_ENABLE_MODULES = YES;
@@ -803,6 +867,7 @@
803867
};
804868
AECBA6111B836BF20004A536 /* Debug */ = {
805869
isa = XCBuildConfiguration;
870+
baseConfigurationReference = 919B9EF9E5898277AD9C772A /* Pods-Tests-SwiftWeatherUITests.debug.xcconfig */;
806871
buildSettings = {
807872
DEVELOPMENT_TEAM = "";
808873
INFOPLIST_FILE = SwiftWeatherUITests/Info.plist;
@@ -818,6 +883,7 @@
818883
};
819884
AECBA6121B836BF20004A536 /* Release */ = {
820885
isa = XCBuildConfiguration;
886+
baseConfigurationReference = 53EEE101C82E858E57980710 /* Pods-Tests-SwiftWeatherUITests.release.xcconfig */;
821887
buildSettings = {
822888
DEVELOPMENT_TEAM = "";
823889
INFOPLIST_FILE = SwiftWeatherUITests/Info.plist;

0 commit comments

Comments
 (0)