X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fspec_helper.rb;h=07db73426ecff37fc2d91c2aa5f4ee0f65b4cc61;hb=refs%2Ftags%2Fv8.2.0;hp=16764b6ff147ab99bf87cf2f9a86af7fdb864ac2;hpb=15a9db1d198f727ea78aac7ecec483a3b00b9165;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 16764b6..07db734 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -48,6 +48,18 @@ RSpec.configure do |c| c.after(:suite) do RSpec::Puppet::Coverage.report!(0) 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