Use Inspec::VERSION directly to decouple from bundler.

Can also try to use the bundler version first and then fall back to
VERSION... but VERSION is absolutely free.

Happy to push an edit to this to remove the comment or fold it in.

Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
Ryan Davis 2019-04-30 15:29:56 -07:00
parent 427d59f13f
commit 80cfc419f8

View file

@ -13,7 +13,8 @@ end
# Grab bundled inspec version. This should be the same as the one
# passed for audit cookbook. If its not, you should do a `bundle install`
inspec_version = Gem.loaded_specs['inspec'].version.to_s
inspec_version = Inspec::VERSION
# or: Gem.loaded_specs['inspec'].version.to_s rescue Inspec::VERSION
control 'Test audit cookbook json output' do
describe json('/tmp/json_export.json') do