Fix failure to pass on class options to subcommands

This commit is contained in:
David Heinemeier Hansson
2023-03-28 18:04:14 +02:00
parent 070c6e8e75
commit 1f83b5f6be
2 changed files with 12 additions and 1 deletions

View File

@@ -121,6 +121,13 @@ class CliAppTest < CliTestCase
end
end
test "version through main" do
stdouted { Mrsk::Cli::Main.start(["app", "version", "-c", "test/fixtures/deploy_with_accessories.yml", "--hosts", "1.1.1.1"]) }.tap do |output|
assert_match "docker ps --filter label=service=app --format \"{{.Names}}\" | sed 's/-/\\n/g' | tail -n 1", output
end
end
private
def run_command(*command)
stdouted { Mrsk::Cli::App.start([*command, "-c", "test/fixtures/deploy_with_accessories.yml", "--hosts", "1.1.1.1"]) }