Update CocoaPods minimum version to 1.9 (#71170)

This commit is contained in:
Jenn Magder
2020-12-17 10:22:50 -08:00
committed by GitHub
parent 9f7e785c7b
commit 23f5fbc69d
5 changed files with 8 additions and 70 deletions

View File

@@ -80,7 +80,7 @@ void main() {
xcodeProjectInterpreter: mockXcodeProjectInterpreter,
usage: usage,
);
pretendPodVersionIs('1.9.0');
pretendPodVersionIs('1.10.0');
fileSystem.file(fileSystem.path.join(
Cache.flutterRoot, 'packages', 'flutter_tools', 'templates', 'cocoapods', 'Podfile-ios-objc',
))
@@ -177,33 +177,27 @@ void main() {
testWithoutContext('detects below minimum version', () async {
pretendPodIsInstalled();
pretendPodVersionIs('1.5.0');
pretendPodVersionIs('1.6.0');
expect(await cocoaPodsUnderTest.evaluateCocoaPodsInstallation, CocoaPodsStatus.belowMinimumVersion);
});
testWithoutContext('detects below recommended version', () async {
pretendPodIsInstalled();
pretendPodVersionIs('1.6.0');
pretendPodVersionIs('1.9.0');
expect(await cocoaPodsUnderTest.evaluateCocoaPodsInstallation, CocoaPodsStatus.belowRecommendedVersion);
});
testWithoutContext('detects at recommended version', () async {
pretendPodIsInstalled();
pretendPodVersionIs('1.9.0');
pretendPodVersionIs('1.10.0');
expect(await cocoaPodsUnderTest.evaluateCocoaPodsInstallation, CocoaPodsStatus.recommended);
});
testWithoutContext('detects above recommended version', () async {
pretendPodIsInstalled();
pretendPodVersionIs('1.9.1');
pretendPodVersionIs('1.10.1');
expect(await cocoaPodsUnderTest.evaluateCocoaPodsInstallation, CocoaPodsStatus.recommended);
});
testWithoutContext('detects initialized over 1.8.0', () async {
pretendPodIsInstalled();
pretendPodVersionIs('1.8.0');
expect(await cocoaPodsUnderTest.isCocoaPodsInitialized, isTrue);
});
});
group('Setup Podfile', () {

View File

@@ -18,7 +18,6 @@ void main() {
cocoaPods = MockCocoaPods();
when(cocoaPods.evaluateCocoaPodsInstallation)
.thenAnswer((_) async => CocoaPodsStatus.recommended);
when(cocoaPods.isCocoaPodsInitialized).thenAnswer((_) async => true);
when(cocoaPods.cocoaPodsVersionText).thenAnswer((_) async => '1.8.0');
});
@@ -44,13 +43,6 @@ void main() {
expect(result.type, ValidationType.partial);
});
testWithoutContext('Emits partial status when CocoaPods is not initialized', () async {
when(cocoaPods.isCocoaPodsInitialized).thenAnswer((_) async => false);
final CocoaPodsValidator workflow = CocoaPodsValidator(cocoaPods, UserMessages());
final ValidationResult result = await workflow.validate();
expect(result.type, ValidationType.partial);
});
testWithoutContext('Emits partial status when CocoaPods version is too low', () async {
when(cocoaPods.evaluateCocoaPodsInstallation)
.thenAnswer((_) async => CocoaPodsStatus.belowRecommendedVersion);