From 699c67c1aad978b0108c74994faca3f630ff06b9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 6 Nov 2011 22:35:53 -0800 Subject: [PATCH] Test: Able to pass a command to execute via `vagrant ssh` command --- test/acceptance/ssh_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/acceptance/ssh_test.rb b/test/acceptance/ssh_test.rb index 202998f88..f56e0fdca 100644 --- a/test/acceptance/ssh_test.rb +++ b/test/acceptance/ssh_test.rb @@ -34,4 +34,13 @@ class SSHTest < AcceptanceTest assert_equal("hello", result.stdout.chomp, "Vagrant should bring up a virtual machine and be able to SSH in.") end + + should "be able to execute a single command via the command line" do + assert_execute("vagrant", "box", "add", "base", config.boxes["default"]) + assert_execute("vagrant", "init") + assert_execute("vagrant", "up") + + result = assert_execute("vagrant", "ssh", "-c", "echo foo") + assert_equal("foo\n", result.stdout) + end end