Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Mocked out pub get while testing 'all-plugins-app'-command.
  • Loading branch information
IVLIVS-III committed Oct 26, 2022
commit cc6277fd1b5f6961a54a512240da59003cf55b6a
4 changes: 3 additions & 1 deletion script/tool/lib/src/create_all_plugins_app_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:pubspec_parse/pubspec_parse.dart';

import 'common/core.dart';
import 'common/package_command.dart';
import 'common/process_runner.dart';
import 'common/repository_package.dart';

const String _outputDirectoryFlag = 'output-dir';
Expand All @@ -24,8 +25,9 @@ class CreateAllPluginsAppCommand extends PackageCommand {
/// Creates an instance of the builder command.
CreateAllPluginsAppCommand(
Directory packagesDir, {
ProcessRunner processRunner = const ProcessRunner(),
Directory? pluginsRoot,
}) : super(packagesDir) {
}) : super(packagesDir, processRunner: processRunner) {
final Directory defaultDir =
pluginsRoot ?? packagesDir.fileSystem.currentDirectory;
argParser.addOption(_outputDirectoryFlag,
Expand Down
3 changes: 3 additions & 0 deletions script/tool/test/create_all_plugins_app_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ void main() {
late FileSystem fileSystem;
late Directory testRoot;
late Directory packagesDir;
late RecordingProcessRunner processRunner;

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

command = CreateAllPluginsAppCommand(
packagesDir,
processRunner: processRunner,
pluginsRoot: testRoot,
);
runner = CommandRunner<void>(
Expand Down