summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-03-31 11:33:50 -0700
committerTim Smith <tsmith84@gmail.com>2020-03-31 11:33:50 -0700
commit0afbeaf6e6394d7128793dd1b39ce59a9a30eb0c (patch)
treef920a2c580060ff91067f6b0c06927d4aec12536
parentfbd75349092772dae1e05d2a5051f7ba8cbba691 (diff)
downloadchef-0afbeaf6e6394d7128793dd1b39ce59a9a30eb0c.tar.gz
Fix failing specs
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/unit/resource/build_essential_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/resource/build_essential_spec.rb b/spec/unit/resource/build_essential_spec.rb
index 62d7963ea2..e41256176f 100644
--- a/spec/unit/resource/build_essential_spec.rb
+++ b/spec/unit/resource/build_essential_spec.rb
@@ -59,12 +59,12 @@ describe Chef::Resource::BuildEssential do
describe "#xcode_cli_installed?" do
it "returns true if the CLI is in the InstallHistory plist" do
- allow(::File).to receive(:open).with("/Library/Receipts/InstallHistory.plist", "r").and_return("spec/unit/resource/data/InstallHistory_with_CLT.plist")
+ allow(::File).to receive(:open).with("/Library/Receipts/InstallHistory.plist", "r").and_return(::File.join(::File.dirname(__FILE__), "data/InstallHistory_with_CLT.plist"))
expect(provider.xcode_cli_installed?).to eql(true)
end
it "returns false if the pkgutil doesn't list the package" do
- allow(::File).to receive(:open).with("/Library/Receipts/InstallHistory.plist", "r").and_return("spec/unit/resource/data/InstallHistory_without_CLT.plist")
+ allow(::File).to receive(:open).with("/Library/Receipts/InstallHistory.plist", "r").and_return(::File.join(::File.dirname(__FILE__), "data/InstallHistory_without_CLT.plist"))
expect(provider.xcode_cli_installed?).to eql(false)
end
end