mirror of
https://github.com/inspec/inspec
synced 2024-11-27 15:10:44 +00:00
c993f91ca6
Signed-off-by: Miah Johnson <miah@chia-pet.org>
19 lines
554 B
Ruby
19 lines
554 B
Ruby
require "minitest/autorun"
|
|
require "open3"
|
|
|
|
TEST_CLI_OPTS = "--chef-license=accept-no-persist".freeze
|
|
|
|
class ArtifactTest < Minitest::Test
|
|
make_my_diffs_pretty!
|
|
|
|
def assert_artifact(inspec_command)
|
|
command = "inspec #{inspec_command} #{TEST_CLI_OPTS}"
|
|
stdout, stderr, status = Open3.capture3({ "PATH" => ENV["PATH"] },
|
|
command,
|
|
{ chdir: ENV["project_root"] })
|
|
|
|
assert_empty stderr.sub(/#< CLIXML\n/, "")
|
|
assert stdout
|
|
assert status
|
|
end
|
|
end
|