Update Environment#dotfile_path to take advantage of new Pathname object

This commit is contained in:
Mitchell Hashimoto 2010-09-07 00:28:21 -07:00
parent fe593c88b8
commit 88fedb419e
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ module Vagrant
# The path to the `dotfile`, which contains the persisted UUID of
# the VM if it exists.
def dotfile_path
root_path ? File.join(root_path, config.vagrant.dotfile_name) : nil
root_path.join(config.vagrant.dotfile_name) rescue nil
end
# The path to the home directory, which is usually in `~/.vagrant/~

View File

@ -54,7 +54,7 @@ class EnvironmentTest < Test::Unit::TestCase
context "dotfile path" do
should "build up the dotfile out of the root path and the dotfile name" do
assert_equal File.join(@env.root_path, @env.config.vagrant.dotfile_name), @env.dotfile_path
assert_equal @env.root_path.join(@env.config.vagrant.dotfile_name), @env.dotfile_path
end
end