diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2020-01-24 15:50:30 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2020-01-24 15:50:30 -0800 |
commit | a354ad1c6abd748616e90f6d4a2af435ca0f68a6 (patch) | |
tree | 300613e1c989a2465f3a2cdbde5ac3088dc053d6 /spec | |
parent | 17eb7685ab7384357a2643145d97e3ca4af83cb4 (diff) | |
download | chef-a354ad1c6abd748616e90f6d4a2af435ca0f68a6.tar.gz |
get rid of the failures due to deprecation warnings
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/cookbook/cookbook_version_loader_spec.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/unit/cookbook/cookbook_version_loader_spec.rb b/spec/unit/cookbook/cookbook_version_loader_spec.rb index 518ffa7d2d..b1c2a46827 100644 --- a/spec/unit/cookbook/cookbook_version_loader_spec.rb +++ b/spec/unit/cookbook/cookbook_version_loader_spec.rb @@ -1,6 +1,6 @@ # # Author:: Daniel DeLeo (<dan@chef.io>) -# Copyright:: Copyright 2014-2018, Chef Software Inc. +# Copyright:: Copyright 2014-2020, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -124,8 +124,9 @@ describe Chef::Cookbook::CookbookVersionLoader do expect { cookbook_loader.load! }.to raise_error(Chef::Exceptions::CookbookNotFoundInRepo) end - it "gives deprecation warning called with #load and raise error for Cookbook not found" do - expect { cookbook_loader.load }.to raise_error(Chef::Exceptions::CookbookNotFoundInRepo) + it "gives deprecation warning called with #load" do + Chef::Config[:treat_deprecation_warnings_as_errors] = false + cookbook_loader.load end end @@ -149,6 +150,7 @@ describe Chef::Cookbook::CookbookVersionLoader do end it "gives deprecation warning to us load! when called with #load and raises error" do + Chef::Config[:treat_deprecation_warnings_as_errors] = false expect { cookbook_loader.load }.to raise_error("THIS METADATA HAS A BUG") end @@ -181,6 +183,7 @@ describe Chef::Cookbook::CookbookVersionLoader do end it "gives deprecation warning to use load! method when called with #load and raises error for invalid metadata" do + Chef::Config[:treat_deprecation_warnings_as_errors] = false expect { cookbook_loader.load }.to raise_error(Chef::Exceptions::MetadataNotValid, error_message) end |