summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-12-01 13:29:22 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-12-13 13:31:50 -0800
commit8bf56eae2de37e6dcaa79cd83179a595b0260977 (patch)
treef973f94b06b7d6e1b382ccc613245d1d0f7914ad
parentecfd20c6d27fc0a69a353e14926d59c0a323de92 (diff)
downloadchef-8bf56eae2de37e6dcaa79cd83179a595b0260977.tar.gz
fix deprecation warning tests
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--spec/functional/resource/dnf_package_spec.rb4
1 files changed, 4 insertions, 0 deletions
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)