diff options
author | Josh Cooper <joshcooper@users.noreply.github.com> | 2021-08-17 09:18:57 -0700 |
---|---|---|
committer | Josh Cooper <joshcooper@users.noreply.github.com> | 2021-08-17 09:18:57 -0700 |
commit | a3dcc2e0070e6223342a5ce72f9003fd12c1eab9 (patch) | |
tree | 4b706a1813a8d4ea0553a25f126fe4be9e07934b /spec | |
parent | b088e56f0dda3526df1f20868dbe556770d1bd4a (diff) | |
download | puppet-cron_core-a3dcc2e0070e6223342a5ce72f9003fd12c1eab9.tar.gz puppet-cron_core-a3dcc2e0070e6223342a5ce72f9003fd12c1eab9.tar.bz2 |
(maint) Update to pdk templates 2.2.0
Generated using:
$ pdk --version
2.2.0
$ pdk update --template-ref 2.2.0
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec_helper.rb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 29615cd..9b1fa6f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,9 @@ +# frozen_string_literal: true + +RSpec.configure do |c| + c.mock_with :rspec +end + require 'puppetlabs_spec_helper/module_spec_helper' require 'rspec-puppet-facts' @@ -31,16 +37,28 @@ default_facts.each do |fact, value| end RSpec.configure do |c| - c.mock_with :rspec c.default_facts = default_facts c.before :each do # set to strictest setting for testing # by default Puppet runs at warning level Puppet.settings[:strict] = :warning + Puppet.settings[:strict_variables] = true end c.filter_run_excluding(bolt: true) unless ENV['GEM_BOLT'] c.after(:suite) do end + + # Filter backtrace noise + backtrace_exclusion_patterns = [ + %r{spec_helper}, + %r{gems}, + ] + + if c.respond_to?(:backtrace_exclusion_patterns) + c.backtrace_exclusion_patterns = backtrace_exclusion_patterns + elsif c.respond_to?(:backtrace_clean_patterns) + c.backtrace_clean_patterns = backtrace_exclusion_patterns + end end # Ensures that a module is defined |