summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtest/lib/puppettest.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/lib/puppettest.rb b/test/lib/puppettest.rb
index 76ae96e02..6c95985bf 100755
--- a/test/lib/puppettest.rb
+++ b/test/lib/puppettest.rb
@@ -6,7 +6,16 @@ mainlib = File.expand_path(File.join(File.dirname(__FILE__), '../../lib'))
$LOAD_PATH.unshift(mainlib) unless $LOAD_PATH.include?(mainlib)
require 'puppet'
-require 'mocha'
+
+# include any gems in vendor/gems
+Dir["#{mainlib}/../vendor/gems/**"].each do |path|
+ libpath = File.join(path, "lib")
+ if File.directory?(libpath)
+ $LOAD_PATH.unshift(libpath)
+ else
+ $LOAD_PATH.unshift(path)
+ end
+end
# Only load the test/unit class if we're not in the spec directory.
# Else we get the bogus 'no tests, no failures' message.