Add helper to filter out deprecations on stderr

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
Clinton Wolfe 2019-04-23 11:19:51 -04:00
parent f1cc0b0477
commit aa19b6e99d

View file

@ -42,6 +42,14 @@ module Inspec
msg += "\nSTDERR:\n" + stderr msg += "\nSTDERR:\n" + stderr
msg.must_equal '' msg.must_equal ''
end 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
end end