From b58bb1ab988b6f2ba69233d9d9a7505ccf9f3288 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Mon, 29 Nov 2021 16:07:11 -0800 Subject: Rubygems 3.2.x spec fixes Needed for ruby-3.0.3 Signed-off-by: Lamont Granquist --- spec/unit/provider/package/rubygems_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/unit/provider/package/rubygems_spec.rb b/spec/unit/provider/package/rubygems_spec.rb index 6ef63d3961..a4ffc1712e 100644 --- a/spec/unit/provider/package/rubygems_spec.rb +++ b/spec/unit/provider/package/rubygems_spec.rb @@ -410,6 +410,9 @@ describe Chef::Provider::Package::Rubygems do # Rubygems uses these two interally allow(RbConfig::CONFIG).to receive(:[]).with("arch").and_call_original allow(RbConfig::CONFIG).to receive(:[]).with("ruby_install_name").and_call_original + allow(RbConfig::CONFIG).to receive(:[]).with("ruby_version").and_call_original + allow(RbConfig::CONFIG).to receive(:[]).with("rubylibprefix").and_call_original + allow(RbConfig::CONFIG).to receive(:[]).with("vendordir").and_call_original allow(File).to receive(:executable?).and_return false allow(File).to receive(:executable?).with("#{bindir}/gem").and_return true # XXX: we can't stub the provider object directly here because referencing it will create it and that -- cgit v1.2.1