From 5ff105979452421f137a91262ddf801be7ddcdfa Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Tue, 4 May 2021 10:34:57 -0700 Subject: Fix yum specs Reset the singleton instance before starting the test, because singletons. Also better clears up some internal state when the daemon gets reaped Signed-off-by: Lamont Granquist --- spec/unit/provider/package/yum/python_helper_spec.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'spec') diff --git a/spec/unit/provider/package/yum/python_helper_spec.rb b/spec/unit/provider/package/yum/python_helper_spec.rb index 39c067d135..b8336a500b 100644 --- a/spec/unit/provider/package/yum/python_helper_spec.rb +++ b/spec/unit/provider/package/yum/python_helper_spec.rb @@ -21,6 +21,7 @@ require "spec_helper" describe Chef::Provider::Package::Yum::PythonHelper do let(:helper) { Chef::Provider::Package::Yum::PythonHelper.instance } + before(:each) { Singleton.__init__(Chef::Provider::Package::Yum::PythonHelper) } it "propagates stacktraces on stderr from the forked subprocess", :rhel do allow(helper).to receive(:yum_command).and_return("ruby -e 'raise \"your hands in the air\"'") -- cgit v1.2.1