summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Doherty <cdoherty@getchef.com>2014-10-15 14:53:40 -0700
committerChris Doherty <cdoherty@getchef.com>2014-10-15 14:53:40 -0700
commit5bc92d35d8c6f8266348324ceb3d7740dbe57126 (patch)
treefe2500248965907062d4ef3566fd9c7dad25ffd8
parentd3150dcf413e96a5140e0e30ac94698e159632a9 (diff)
downloadchef-cdoherty-eliminate-spec-remnants.tar.gz
file_spec: chdir into the temp directory so we don't leave test files in the source root.cdoherty-eliminate-spec-remnants
-rw-r--r--spec/functional/resource/file_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/functional/resource/file_spec.rb b/spec/functional/resource/file_spec.rb
index 99966f85c8..83f051ea06 100644
--- a/spec/functional/resource/file_spec.rb
+++ b/spec/functional/resource/file_spec.rb
@@ -17,6 +17,7 @@
#
require 'spec_helper'
+require 'tmpdir'
describe Chef::Resource::File do
include_context Chef::Resource::File
@@ -30,6 +31,7 @@ describe Chef::Resource::File do
run_context = Chef::RunContext.new(node, {}, events)
use_path = if opts[:use_relative_path]
+ Dir.chdir(Dir.tmpdir)
File.basename(path)
else
path