Browse Source

[puppet4] Workaround for PUP-3336

Noop tests fail to autoload unless lib_dirs
aren't added to LOAD_PATH.

Change-Id: I7c7ee08ea345afc6f5bbe560f06ab106132288f6
Closes-Bug: #1660579
Mykyta Karpin 2 years ago
parent
commit
bd8096e59e
1 changed files with 3 additions and 5 deletions
  1. 3
    5
      spec/spec_helper.rb

+ 3
- 5
spec/spec_helper.rb View File

@@ -9,11 +9,9 @@ require 'webmock/rspec'
9 9
 require_relative '../lib/noop'
10 10
 
11 11
 # Add fixture lib dirs to LOAD_PATH. Work-around for PUP-3336
12
-if Puppet.version < '4.0.0'
13
-  Noop::Config.list_path_modules.each do |path|
14
-    Dir["#{path}/*/lib"].entries.each do |lib_dir|
15
-      $LOAD_PATH << lib_dir
16
-    end
12
+Noop::Config.list_path_modules.each do |path|
13
+  Dir["#{path}/*/lib"].entries.each do |lib_dir|
14
+    $LOAD_PATH << lib_dir
17 15
   end
18 16
 end
19 17
 

Loading…
Cancel
Save