summaryrefslogtreecommitdiff
path: root/chef-config/spec
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2020-08-13 19:14:20 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2020-08-14 16:34:46 -0700
commit654f05b3a03aecdcb25c6a2c9593b13d3163362a (patch)
tree5796295df673e2417fdf20a9f5d396ad6670cac7 /chef-config/spec
parent9851800cb4bcc481a00c949da2a86e15a94652f6 (diff)
downloadchef-654f05b3a03aecdcb25c6a2c9593b13d3163362a.tar.gz
Fix bootstrapping windows-from-linux
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'chef-config/spec')
-rw-r--r--chef-config/spec/unit/path_helper_spec.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/chef-config/spec/unit/path_helper_spec.rb b/chef-config/spec/unit/path_helper_spec.rb
index f416bb1826..60bc20d3f3 100644
--- a/chef-config/spec/unit/path_helper_spec.rb
+++ b/chef-config/spec/unit/path_helper_spec.rb
@@ -232,14 +232,14 @@ RSpec.describe ChefConfig::PathHelper do
describe "paths_eql?" do
it "returns true if the paths are the same" do
- allow(path_helper).to receive(:canonical_path).with("bandit").and_return("c:/bandit/bandit")
- allow(path_helper).to receive(:canonical_path).with("../bandit/bandit").and_return("c:/bandit/bandit")
+ allow(path_helper).to receive(:canonical_path).with("bandit", windows: ChefUtils.windows?).and_return("c:/bandit/bandit")
+ allow(path_helper).to receive(:canonical_path).with("../bandit/bandit", windows: ChefUtils.windows?).and_return("c:/bandit/bandit")
expect(path_helper.paths_eql?("bandit", "../bandit/bandit")).to be_truthy
end
it "returns false if the paths are different" do
- allow(path_helper).to receive(:canonical_path).with("bandit").and_return("c:/Bo/Bandit")
- allow(path_helper).to receive(:canonical_path).with("../bandit/bandit").and_return("c:/bandit/bandit")
+ allow(path_helper).to receive(:canonical_path).with("bandit", windows: ChefUtils.windows?).and_return("c:/Bo/Bandit")
+ allow(path_helper).to receive(:canonical_path).with("../bandit/bandit", windows: ChefUtils.windows?).and_return("c:/bandit/bandit")
expect(path_helper.paths_eql?("bandit", "../bandit/bandit")).to be_falsey
end
end
@@ -259,8 +259,6 @@ RSpec.describe ChefConfig::PathHelper do
else
"this/\\*path/\\[needs\\]/escaping\\?"
end
- expect(path_helper).to receive(:join).with(*args).and_call_original
- expect(path_helper).to receive(:cleanpath).and_call_original
expect(path_helper.escape_glob(*args)).to eq(escaped_path)
end
end