diff options
author | Lamont Granquist <lamont@opscode.com> | 2021-05-07 20:52:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-07 20:52:55 -0700 |
commit | 30d26329f2a741dd453f5c33ed929c83d96379f5 (patch) | |
tree | d5c1d7edda2162f9c3a3150c97add3a27806ee08 | |
parent | 61528b956fd6f63911ca0dae87f35162ea5b7d01 (diff) | |
parent | 315dc1ecb449651331ac4142215d6217f76c37ca (diff) | |
download | chef-30d26329f2a741dd453f5c33ed929c83d96379f5.tar.gz |
Merge pull request #11549 from chef/lcg/reset-dnf-helper
Really fix the DNF spec tests
-rw-r--r-- | spec/unit/provider/package/dnf/python_helper_spec.rb | 2 |
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 |