From bfcc0d3939b99e4046f95e59c79ba23be4d84ec7 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 22 Mar 2010 00:09:30 -0700 Subject: [PATCH] Whitespace fixes --- lib/vagrant/actions/box/download.rb | 2 +- test/vagrant/actions/box/download_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vagrant/actions/box/download.rb b/lib/vagrant/actions/box/download.rb index 81e932e8e..aedf53791 100644 --- a/lib/vagrant/actions/box/download.rb +++ b/lib/vagrant/actions/box/download.rb @@ -57,7 +57,7 @@ module Vagrant end end - def file_temp_path + def file_temp_path File.join(@runner.env.tmp_path, BASENAME + Time.now.to_i.to_s) end diff --git a/test/vagrant/actions/box/download_test.rb b/test/vagrant/actions/box/download_test.rb index 01ad99a55..bb331eed6 100644 --- a/test/vagrant/actions/box/download_test.rb +++ b/test/vagrant/actions/box/download_test.rb @@ -81,9 +81,9 @@ class DownloadBoxActionTest < Test::Unit::TestCase context "tempfile" do should "create a tempfile in the vagrant tmp directory" do - File.expects(:open).with { |name, bitmask| + File.expects(:open).with { |name, bitmask| name =~ /#{Vagrant::Actions::Box::Download::BASENAME}/ && name =~ /#{@runner.env.tmp_path}/ - }.once + }.once @action.with_tempfile end