diff --git a/lib/resources/command.rb b/lib/resources/command.rb index 3a8f44de7..83b60d720 100644 --- a/lib/resources/command.rb +++ b/lib/resources/command.rb @@ -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