diff --git a/test/functional/helper.rb b/test/functional/helper.rb index e662cae31..1bcd7034e 100644 --- a/test/functional/helper.rb +++ b/test/functional/helper.rb @@ -42,6 +42,14 @@ module Inspec msg += "\nSTDERR:\n" + stderr msg.must_equal '' end + + def stderr_ignore_deprecations + stderr.split("\n").reject { |l| l.include? ' DEPRECATION: ' }.join("\n") + end + + def stdout_ignore_deprecations + stdout.split("\n").reject { |l| l.include? ' DEPRECATION: ' }.join("\n") + end end end