Inspec controls
Control block helps the encapsulate the Inspec test within the block with more information
A simple Control block will look like follows
control "1.0" do # A unique ID for this control
impact 0.7 # The criticality, if this control
title "Create /tmp directory" # A human-readable title
desc "An optional description..."
describe file("/tmp") do # The actual test
it { should be_directory }
end
end
Task
Convert the existing test that you have created for the previous task into the Controls