From 8bf56eae2de37e6dcaa79cd83179a595b0260977 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Thu, 1 Dec 2016 13:29:22 -0800 Subject: fix deprecation warning tests Signed-off-by: Lamont Granquist --- spec/functional/resource/dnf_package_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/functional/resource/dnf_package_spec.rb b/spec/functional/resource/dnf_package_spec.rb index 4e038de01e..1dd5eda181 100644 --- a/spec/functional/resource/dnf_package_spec.rb +++ b/spec/functional/resource/dnf_package_spec.rb @@ -177,6 +177,8 @@ gpgcheck=0 end it "throws a deprecation warning with allow_downgrade" do + Chef::Config[:treat_deprecation_warnings_as_errors] = false + expect(Chef).to receive(:deprecated).with(:dnf_package_allow_downgrade, /^the allow_downgrade property on the dnf_package provider is not used/) preinstall("chef_rpm-1.10-1.fc24.x86_64.rpm") dnf_package.version("1.2") dnf_package.run_action(:install) @@ -251,6 +253,8 @@ gpgcheck=0 end it "throws a deprecation warning with allow_downgrade" do + Chef::Config[:treat_deprecation_warnings_as_errors] = false + expect(Chef).to receive(:deprecated).with(:dnf_package_allow_downgrade, /^the allow_downgrade property on the dnf_package provider is not used/) preinstall("chef_rpm-1.10-1.fc24.x86_64.rpm") dnf_package.version("1.2") dnf_package.run_action(:install) -- cgit v1.2.1