diff options
author | Chris Doherty <cdoherty@getchef.com> | 2014-10-15 14:53:40 -0700 |
---|---|---|
committer | Chris Doherty <cdoherty@getchef.com> | 2014-10-15 14:53:40 -0700 |
commit | 5bc92d35d8c6f8266348324ceb3d7740dbe57126 (patch) | |
tree | fe2500248965907062d4ef3566fd9c7dad25ffd8 /spec | |
parent | d3150dcf413e96a5140e0e30ac94698e159632a9 (diff) | |
download | chef-5bc92d35d8c6f8266348324ceb3d7740dbe57126.tar.gz |
file_spec: chdir into the temp directory so we don't leave test files in the source root.cdoherty-eliminate-spec-remnants
Diffstat (limited to 'spec')
-rw-r--r-- | spec/functional/resource/file_spec.rb | 2 |
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 |