anchor.diff:  
   void main() {
     FileSystem fileSystem;
  -  ProcessManager mockProcessManager;
  +  FakeProcessManager fakeProcessManager;
     MockXcodeProjectInterpreter mockXcodeProjectInterpreter;
     FlutterProject projectUnderTest;
     CocoaPods cocoaPodsUnderTest;
  -  InvokeProcess resultOfPodVersion;
     BufferLogger logger;
     TestUsage usage;
   
     void pretendPodVersionFails() {
  -    resultOfPodVersion = () async => exitsWithError();
  +    fakeProcessManager.addCommand(
  +      const FakeCommand(
  +        command: <String>['pod', '--version'],
  +        exitCode: 1,
  +      ),
  +    );
     }
   
     void pretendPodVersionIs(String versionText) {
  -    resultOfPodVersion = () async => exitsHappy(versionText);
  +    fakeProcessManager.addCommand(
  +      FakeCommand(
  +        command: const <String>['pod', '--version'],
  +        stdout: versionText,
  +      ),
  +    );
     }
   
     void podsIsInHomeDir() {
  
positive.code:  * not added the source repo that hosts the Podspec to your Podfile.
  
  Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.''',
        ));
        try {
          await cocoaPodsUnderTest.processPods(
            xcodeProject: projectUnderTest.ios,
            buildMode: BuildMode.debug,
          );
          fail('ToolExit expected');
        } on Exception catch (e) {
          expect(e, isA<ToolExit>());
          expect(
            logger.errorText,
            contains("CocoaPods's specs repository is too out-of-date to satisfy dependencies"),
          );
        }
      });
  
      testWithoutContext('ffi failure on ARM macOS prompts gem install', () async {
        pretendPodIsInstalled();
        fileSystem.file(fileSystem.path.join('project', 'ios', 'Podfile'))
          ..createSync()
          ..writeAsStringSync('Existing Podfile');
  
        when(mockProcessManager.runSync(<String>['which', 'sysctl']))
            .thenReturn(ProcessResult(0, 0, '', ''));
        when(mockProcessManager.runSync(<String>['sysctl', 'hw.optional.arm64']))
            .thenReturn(ProcessResult(0, 0, 'hw.optional.arm64: 1', ''));
  
        when(mockProcessManager.run(
          <String>['pod', 'install', '--verbose'],
          workingDirectory: 'project/ios',
          environment: <String, String>{
            'COCOAPODS_DISABLE_STATS': 'true',
            'LANG': 'en_US.UTF-8',
          },
        )).thenAnswer((_) async => exitsWithError(
              'LoadError - dlsym(0x7fbbeb6837d0, Init_ffi_c): symbol not found - /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle',
            ));
  
        await expectToolExitLater(
          cocoaPodsUnderTest.processPods(
  
negative.code:     )).createSync(recursive: true);
    }
  
    setUp(() async {
      Cache.flutterRoot = 'flutter';
      fileSystem = MemoryFileSystem.test();
      fakeProcessManager = FakeProcessManager.list(<FakeCommand>[]);
      logger = BufferLogger.test();
      mockXcodeProjectInterpreter = MockXcodeProjectInterpreter();
      projectUnderTest = FlutterProject.fromDirectory(fileSystem.directory('project'));
  