mirror of
https://github.com/inspec/inspec
synced 2024-11-23 21:23:29 +00:00
Merge pull request #756 from Anirudh-Gupta/master
modification in command resource example
This commit is contained in:
commit
23c4bc0a6e
1 changed files with 5 additions and 1 deletions
|
@ -10,11 +10,15 @@ module Inspec::Resources
|
|||
desc 'Use the command InSpec audit resource to test an arbitrary command that is run on the system.'
|
||||
example "
|
||||
describe command('ls -al /') do
|
||||
it { should exist }
|
||||
its('stdout') { should match /bin/ }
|
||||
its('stderr') { should eq '' }
|
||||
its('exit_status') { should eq 0 }
|
||||
end
|
||||
|
||||
command('ls -al /').exist? will return false. Existence of command should be checked this way.
|
||||
describe command('ls') do
|
||||
it { should exist }
|
||||
end
|
||||
"
|
||||
|
||||
attr_reader :command
|
||||
|
|
Loading…
Reference in a new issue