diff --git a/lib/vagrant/action/box/verify.rb b/lib/vagrant/action/box/verify.rb index b42b0d500..196003236 100644 --- a/lib/vagrant/action/box/verify.rb +++ b/lib/vagrant/action/box/verify.rb @@ -10,7 +10,7 @@ module Vagrant def call(env) begin env.ui.info "vagrant.actions.box.verify.verifying" - VirtualBox::Appliance.new(env["box"].ovf_file) + VirtualBox::Appliance.new(env["box"].ovf_file.to_s) rescue Exception raise Errors::BoxVerificationFailed.new end diff --git a/test/vagrant/action/box/verify_test.rb b/test/vagrant/action/box/verify_test.rb index e478b3858..f55f2e034 100644 --- a/test/vagrant/action/box/verify_test.rb +++ b/test/vagrant/action/box/verify_test.rb @@ -12,7 +12,7 @@ class VerifyBoxActionTest < Test::Unit::TestCase context "calling" do should "continue fine if verification succeeds" do seq = sequence("seq") - VirtualBox::Appliance.expects(:new).with(@env["box"].ovf_file).in_sequence(seq) + VirtualBox::Appliance.expects(:new).with(@env["box"].ovf_file.to_s).in_sequence(seq) @app.expects(:call).with(@env).once.in_sequence(seq) assert_nothing_raised { @instance.call(@env) @@ -20,7 +20,7 @@ class VerifyBoxActionTest < Test::Unit::TestCase end should "halt chain if verification fails" do - VirtualBox::Appliance.expects(:new).with(@env["box"].ovf_file).raises(Exception) + VirtualBox::Appliance.expects(:new).with(@env["box"].ovf_file.to_s).raises(Exception) @app.expects(:call).with(@env).never assert_raises(Vagrant::Errors::BoxVerificationFailed) { @instance.call(@env)