diff --git a/lib/puppetlabs_spec_helper/module_spec_helper.rb b/lib/puppetlabs_spec_helper/module_spec_helper.rb index e691d50f..412c0a9e 100644 --- a/lib/puppetlabs_spec_helper/module_spec_helper.rb +++ b/lib/puppetlabs_spec_helper/module_spec_helper.rb @@ -58,7 +58,7 @@ def verify_contents(subject, title, expected_lines) Dir.entries(dir).grep_v(/^\./).map { |f| File.join(dir, f, 'spec', 'lib') } end -components.flatten.each do |d| +components.compact.flatten.each do |d| $LOAD_PATH << d if FileTest.directory?(d) && !$LOAD_PATH.include?(d) end