inspec/test/artifact/inspec_detect_test.rb
Miah Johnson 6ad21441e4 Move exist checks to own test. Use open3
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-07 15:34:21 -08:00

15 lines
366 B
Ruby

require_relative "artifact_helper"
require "open3"
class TestInspecDetect < Minitest::Test
parallelize_me!
def test_detect
command = "/bin/inspec detect --no-color #{TEST_CLI_OPTS}"
stdout, stderr, status = Open3.capture3(command)
assert_empty stderr.sub(/#< CLIXML\n/, "")
assert_match(/Platform Details/, stdout)
assert status
end
end