inspec/test/unit
Keith Walters 215ef38ee9 Fix installed? check for gem resource
The gem resource used to determine if a gem is installed based on the exit
status of the `gem` command, however that command will return zero
if the package was found or not. This patch checks to ensure that the
`gem list` command actually includes the gem name or is empty to
determine if the gem is in fact installed.

If the gem command returns something other than a `0` exit code, then
it'll skip the resource.

Signed-off-by: Keith Walters <keith.walters@cattywamp.us>
2017-05-22 15:34:01 -05:00
..
bundles Feature/fix ability to pass in supermarket url (#1595) 2017-03-29 12:42:24 -04:00
dependencies Bump lockfile version to 1.0 2016-09-26 09:51:04 +01:00
dsl add inspec.profile.file(...) for profile files 2017-05-03 20:39:27 +02:00
fetchers Change :shasum key to :sha256 for future upgrade 2016-09-21 10:51:04 +01:00
mock Fix installed? check for gem resource 2017-05-22 15:34:01 -05:00
plugins Remove some warnings during the test run 2016-09-09 14:14:36 +01:00
profiles throw an error during inspec check if the version is not correct 2017-05-18 09:13:37 -04:00
resources Fix installed? check for gem resource 2017-05-22 15:34:01 -05:00
source_readers add inspec.profile.file(...) for profile files 2017-05-03 20:39:27 +02:00
utils rename SimpleConfig / parse_config / parse_config_file options 2017-04-26 23:18:40 +02:00
file_provider_test.rb add inspec.profile.file(...) for profile files 2017-05-03 20:39:27 +02:00
runner_test.rb Handle parse errors for attrs/secrets 2017-05-09 13:44:33 +02:00
shell_detector_test.rb Add inspec env command to configure shell tab-completion 2016-08-10 02:07:53 +01:00