provisioners/chef: fix failing test

This commit is contained in:
Mitchell Hashimoto 2015-01-06 10:57:25 -08:00
parent 5b4b387f04
commit 661657c63f
1 changed files with 3 additions and 4 deletions

View File

@ -42,7 +42,8 @@ module VagrantPlugins
# The destination (on the guest) where the recipe will live
# @return [String]
def target_recipe_path(key)
def target_recipe_path
key = Digest::MD5.hexdigest(config.recipe)
File.join(config.upload_path, "recipe-#{key}.rb")
end
@ -55,9 +56,7 @@ module VagrantPlugins
file.rewind
# Upload the tempfile to the guest
@machine.communicate.upload(
file.path,
target_recipe_path(Digest::MD5.hexdigest(config.recipe)))
@machine.communicate.upload(file.path, target_recipe_path)
ensure
# Delete our template
file.close