Functional helper let changes.

Moved exec_inspec to inspec_path.
Added new exec_inspec that invokes ruby w/ -Ilib (expanded).

Decouples from bundler and/or needing inspec-bin to be installed.

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

View file

@ -81,7 +81,9 @@ module FunctionalHelper
path.gsub!('//vboxsrv', 'C:') if is_windows?
path
end
let(:exec_inspec) { File.join(repo_path, 'inspec-bin', 'bin', 'inspec') }
let(:inspec_path) { File.join(repo_path, 'inspec-bin', 'bin', 'inspec') }
libdir = File.expand_path "lib"
let(:exec_inspec) { [Gem.ruby, "-I#{libdir}", inspec_path].join " " }
let(:mock_path) { File.join(repo_path, 'test', 'unit', 'mock') }
let(:profile_path) { File.join(mock_path, 'profiles') }
let(:examples_path) { File.join(profile_path, 'old-examples') }