I am new to Chef Inspec, I want to test Reboot Required for (Windows Only) using Inspec code. Below is my code:
# Reboot Required Yes for windows
control 'PowerShellTest' do
impact 0.1
title 'Check powershell code inside inspec'
desc 'TestCase for Powershell'
if os.family == 'windows'
describe command(shutdown /r) do
its('action') { should be 'yes' }
its('stderr') { should eq '' }
its('exit_status') { should eq 0 }
end
end