Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit cc6277f

Browse files
committed
Mocked out pub get while testing 'all-plugins-app'-command.
1 parent 46a360c commit cc6277f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

script/tool/lib/src/create_all_plugins_app_command.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import 'package:pubspec_parse/pubspec_parse.dart';
1111

1212
import 'common/core.dart';
1313
import 'common/package_command.dart';
14+
import 'common/process_runner.dart';
1415
import 'common/repository_package.dart';
1516

1617
const String _outputDirectoryFlag = 'output-dir';
@@ -24,8 +25,9 @@ class CreateAllPluginsAppCommand extends PackageCommand {
2425
/// Creates an instance of the builder command.
2526
CreateAllPluginsAppCommand(
2627
Directory packagesDir, {
28+
ProcessRunner processRunner = const ProcessRunner(),
2729
Directory? pluginsRoot,
28-
}) : super(packagesDir) {
30+
}) : super(packagesDir, processRunner: processRunner) {
2931
final Directory defaultDir =
3032
pluginsRoot ?? packagesDir.fileSystem.currentDirectory;
3133
argParser.addOption(_outputDirectoryFlag,

script/tool/test/create_all_plugins_app_command_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ void main() {
2020
late FileSystem fileSystem;
2121
late Directory testRoot;
2222
late Directory packagesDir;
23+
late RecordingProcessRunner processRunner;
2324

2425
setUp(() {
2526
// Since the core of this command is a call to 'flutter create', the test
@@ -28,9 +29,11 @@ void main() {
2829
fileSystem = const LocalFileSystem();
2930
testRoot = fileSystem.systemTempDirectory.createTempSync();
3031
packagesDir = testRoot.childDirectory('packages');
32+
processRunner = RecordingProcessRunner();
3133

3234
command = CreateAllPluginsAppCommand(
3335
packagesDir,
36+
processRunner: processRunner,
3437
pluginsRoot: testRoot,
3538
);
3639
runner = CommandRunner<void>(

0 commit comments

Comments
 (0)