summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2015-02-06 14:58:26 -0800
committerdanielsdeleo <dan@getchef.com>2015-02-06 15:00:57 -0800
commit74db11c60c3d39f72e4d09c88aa642af60bbb49d (patch)
tree3090cd88a5c71b51f12a5c1b34dbd8069d5bc82c /spec/spec_helper.rb
parente89989bd04f428c0bc0cd5ce0c459c35ebd54afe (diff)
downloadchef-74db11c60c3d39f72e4d09c88aa642af60bbb49d.tar.gz
Add config to treat deprecation warnings as errors
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index b87736efef..ad1f3f5d0d 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -164,6 +164,12 @@ RSpec.configure do |config|
config.before(:each) do
Chef::Config.reset
+
+ # By default, treat deprecation warnings as errors in tests.
+ Chef::Config.treat_deprecation_warnings_as_errors(true)
+
+ # Set environment variable so the setting persists in child processes
+ ENV['CHEF_TREAT_DEPRECATION_WARNINGS_AS_ERRORS'] = "1"
end
config.before(:suite) do