anchor.diff:    });
   
     group('Setup Podfile', () {
  -    setUp(() {
  -      when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true);
  -    });
  -
       testWithoutContext('creates objective-c Podfile when not present', () async {
  -      when(mockXcodeProjectInterpreter.getBuildSettings(any, scheme: null, timeout: anyNamed('timeout')))
  -        .thenAnswer((_) async => <String, String>{});
         await cocoaPodsUnderTest.setupPodfile(projectUnderTest.ios);
   
         expect(projectUnderTest.ios.podfile.readAsStringSync(), 'Objective-C iOS podfile template');
       });
   
  -    testUsingContext('creates swift Podfile if swift', () async {
  -      when(mockXcodeProjectInterpreter.getBuildSettings(any, scheme: null, timeout: anyNamed('timeout')))
  -        .thenAnswer((_) async => <String, String>{
  -          'SWIFT_VERSION': '5.0',
  -        });
  -
  -      final FlutterProject project = FlutterProject.fromDirectoryTest(globals.fs.directory('project'));
  +    testWithoutContext('creates swift Podfile if swift', () async {
  +      final FakeXcodeProjectInterpreter fakeXcodeProjectInterpreter = FakeXcodeProjectInterpreter(buildSettings: <String, String>{
  +        'SWIFT_VERSION': '5.0',
  +      });
  +      final CocoaPods cocoaPodsUnderTest = CocoaPods(
  +        fileSystem: fileSystem,
  +        processManager: fakeProcessManager,
  +        logger: logger,
  +        platform: FakePlatform(operatingSystem: 'macos'),
  +        xcodeProjectInterpreter: fakeXcodeProjectInterpreter,
  +        usage: usage,
  +      );
  +
  +      final FlutterProject project = FlutterProject.fromDirectoryTest(fileSystem.directory('project'));
         await cocoaPodsUnderTest.setupPodfile(project.ios);
   
         expect(projectUnderTest.ios.podfile.readAsStringSync(), 'Swift iOS podfile template');
  -    }, overrides: <Type, Generator>{
  -      FileSystem: () => fileSystem,
  -      ProcessManager: () => FakeProcessManager.any(),
  -      XcodeProjectInterpreter: () => mockXcodeProjectInterpreter,
       });
   
       testWithoutContext('creates macOS Podfile when not present', () async {
  
positive.code:   });
  }
  
  class MockXcodeProjectInterpreter extends Mock implements XcodeProjectInterpreter {}
  
negative.code:       expect(projectUnderTest.macos.podfile.readAsStringSync(), 'macOS podfile template');
      });
  
      testWithoutContext('does not recreate Podfile when already present', () async {
        projectUnderTest.ios.podfile..createSync()..writeAsStringSync('Existing Podfile');
  
        final FlutterProject project = FlutterProject.fromDirectoryTest(fileSystem.directory('project'));
        await cocoaPodsUnderTest.setupPodfile(project.ios);
  
        expect(projectUnderTest.ios.podfile.readAsStringSync(), 'Existing Podfile');
      });
  
      testWithoutContext('does not create Podfile when we cannot interpret Xcode projects', () async {
        final CocoaPods cocoaPodsUnderTest = CocoaPods(
          fileSystem: fileSystem,
          processManager: fakeProcessManager,
          logger: logger,
          platform: FakePlatform(operatingSystem: 'macos'),
          xcodeProjectInterpreter: FakeXcodeProjectInterpreter(isInstalled: false),
          usage: usage,
        );
  
        final FlutterProject project = FlutterProject.fromDirectoryTest(fileSystem.directory('project'));
        await cocoaPodsUnderTest.setupPodfile(project.ios);
  
        expect(projectUnderTest.ios.podfile.existsSync(), false);
      });
  
      testWithoutContext('includes Pod config in xcconfig files, if not present', () async {
        projectUnderTest.ios.podfile..createSync()..writeAsStringSync('Existing Podfile');
        projectUnderTest.ios.xcodeConfigFor('Debug')
          ..createSync(recursive: true)
  