diff options
author | Vivek Singh <vivek.singh@msystechnologies.com> | 2020-09-09 09:07:41 +0530 |
---|---|---|
committer | Vivek Singh <vivek.singh@msystechnologies.com> | 2020-09-09 09:07:41 +0530 |
commit | ca33291f9493a85516060a1f6236bdd09c2e8b2e (patch) | |
tree | 913088cf1cb54f3dd7b8cdef1180f7666d7aa20b | |
parent | ec3cc7358cfadf02b6fff4f31634a8c2f81af803 (diff) | |
download | chef-ca33291f9493a85516060a1f6236bdd09c2e8b2e.tar.gz |
Mock File.expand_path to fix window C:/ dir appended in absolute path
Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
-rw-r--r-- | spec/unit/data_collector/config_validation_spec.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/unit/data_collector/config_validation_spec.rb b/spec/unit/data_collector/config_validation_spec.rb index d00811f3ef..239ef4b249 100644 --- a/spec/unit/data_collector/config_validation_spec.rb +++ b/spec/unit/data_collector/config_validation_spec.rb @@ -186,6 +186,7 @@ describe Chef::DataCollector::ConfigValidation do allow(File).to receive(:exist?).with(file_path).and_return(true) allow(File).to receive(:readable?).with(file_path).and_return(true) allow(File).to receive(:writable?).with(file_path).and_return(true) + allow(File).to receive(:expand_path).with(file_path).and_return(file_path) end it "with valid files options" do |