From 4e547becab47cb3f4ca17d12e19c8de1ef3b4082 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 25 Dec 2011 09:57:20 -0800 Subject: [PATCH] Tests passing for GH-602 --- test/acceptance/port_forward_test.rb | 4 ++-- test/acceptance/support/output.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/acceptance/port_forward_test.rb b/test/acceptance/port_forward_test.rb index 4d6c1a3ae..356f66d99 100644 --- a/test/acceptance/port_forward_test.rb +++ b/test/acceptance/port_forward_test.rb @@ -92,7 +92,7 @@ VFILE it "refuses to resume if there is a port collision" do # The two environments need to share a VBOX_USER_HOME so that the # VM's go into the same place. - env_vars = { "VBOX_USER_HOME" => Tempdir.new("vagrant").to_s } + env_vars = { "VBOX_USER_HOME" => Tempdir.new("vagrant").path } environment = new_environment(env_vars) environment2 = new_environment(env_vars) @@ -115,7 +115,7 @@ VFILE # result in an error. result = environment.execute("vagrant", "up") result.should_not succeed - result.should match_output(:resume_port_collision) + result.stderr.should match_output(:resume_port_collision) ensure environment.close environment2.close diff --git a/test/acceptance/support/output.rb b/test/acceptance/support/output.rb index 7fcc2772e..44cd28767 100644 --- a/test/acceptance/support/output.rb +++ b/test/acceptance/support/output.rb @@ -42,7 +42,7 @@ module Acceptance end def resume_port_collision - @text =~ // + @text =~ /^This VM cannot be resumed, because the forwarded ports/ end # This checks that the VM with the given `vm_name` has the