summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2021-05-07 20:51:11 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2021-05-07 20:51:11 -0700
commit315dc1ecb449651331ac4142215d6217f76c37ca (patch)
treec1dffa05f4772aed8874bbf655101e5ed5732c87
parent95f75d49a0517ec4d0dcbb39428efa292df1beaf (diff)
downloadchef-315dc1ecb449651331ac4142215d6217f76c37ca.tar.gz
Really fix the DNF spec tests
The rspec expectation is remaining attached to the singleton Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--spec/unit/provider/package/dnf/python_helper_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/unit/provider/package/dnf/python_helper_spec.rb b/spec/unit/provider/package/dnf/python_helper_spec.rb
index 7d55d01698..fb84cdddf9 100644
--- a/spec/unit/provider/package/dnf/python_helper_spec.rb
+++ b/spec/unit/provider/package/dnf/python_helper_spec.rb
@@ -23,9 +23,9 @@ require "spec_helper"
exclude_test = !(%w{rhel fedora amazon}.include?(ohai[:platform_family]) && File.exist?("/usr/bin/dnf"))
describe Chef::Provider::Package::Dnf::PythonHelper, :requires_root, external: exclude_test do
let(:helper) { Chef::Provider::Package::Dnf::PythonHelper.instance }
+ before(:each) { Singleton.__init__(Chef::Provider::Package::Dnf::PythonHelper) }
it "propagates stacktraces on stderr from the forked subprocess", :rhel do
- Singleton.__init__(Chef::Provider::Package::Dnf::PythonHelper)
allow(helper).to receive(:dnf_command).and_return("ruby -e 'raise \"your hands in the air\"'")
expect { helper.package_query(:whatprovides, "tcpdump") }.to raise_error(/your hands in the air/)
end