diff --git a/test/functional/helper.rb b/test/functional/helper.rb index c2ef097ec..a0d7869f8 100644 --- a/test/functional/helper.rb +++ b/test/functional/helper.rb @@ -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') }