diff --git a/test/src/cli/flutter_cli_test.dart b/test/src/cli/flutter_cli_test.dart index 605e98d1..f3a76925 100644 --- a/test/src/cli/flutter_cli_test.dart +++ b/test/src/cli/flutter_cli_test.dart @@ -188,6 +188,13 @@ void main() { p.join(directory.path, 'test_plugin_four'), )..createSync(); + final ignoredDirectories = [ + ignoredDirectory, + ignoredDirectoryTwo, + ignoredDirectoryThree, + ignoredDirectoryFour + ]; + File(p.join(nestedDirectory.path, 'pubspec.yaml')) .writeAsStringSync(_pubspec); File(p.join(ignoredDirectory.path, 'pubspec.yaml')) @@ -218,9 +225,27 @@ void main() { ).whenComplete(() { verify(() { logger.progress( - any(that: contains('Running "flutter packages get" in')), + any( + that: contains( + 'Running "flutter packages get" in ' + '${nestedDirectory.path}', + ), + ), ); }).called(1); + + for (final directory in ignoredDirectories) { + verifyNever(() { + logger.progress( + any( + that: contains( + 'Running "flutter packages get" in ' + '${directory.path}', + ), + ), + ); + }); + } }); }, ); diff --git a/test/src/commands/packages_test.dart b/test/src/commands/packages_test.dart index f99dc924..08d66b19 100644 --- a/test/src/commands/packages_test.dart +++ b/test/src/commands/packages_test.dart @@ -319,9 +319,22 @@ void main() { expect(result, equals(ExitCode.success.code)); verify(() { logger.progress( - any(that: contains('Running "flutter packages get" in')), + any( + that: contains( + 'Running "flutter packages get" in ${directoryA.path}', + ), + ), ); }).called(1); + verifyNever(() { + logger.progress( + any( + that: contains( + 'Running "flutter packages get" in ${directoryB.path}', + ), + ), + ); + }); }), ); });