expand path fix
This commit is contained in:
parent
00eecf5bdd
commit
e35e2fbb04
|
@ -67,7 +67,7 @@ module Vagrant
|
|||
attr_accessor :private_key_path
|
||||
|
||||
def private_key_path
|
||||
File.expand_path(@private_key_path)
|
||||
File.expand_path(@private_key_path, Env.root_path)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@ require File.join(File.dirname(__FILE__), '..', 'test_helper')
|
|||
class ConfigTest < Test::Unit::TestCase
|
||||
context "the ssh config" do
|
||||
should "expand any path when requesting the value" do
|
||||
File.stubs(:expand_path).with(Vagrant.config.ssh[:private_key_path]).returns('success')
|
||||
Vagrant::Env.stubs(:root_path).returns('foo')
|
||||
File.stubs(:expand_path).with(Vagrant.config.ssh[:private_key_path], 'foo').returns('success')
|
||||
assert Vagrant.config.ssh.private_key_path, 'success'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue