summaryrefslogtreecommitdiffstats
path: root/test/lib/puppettest.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-12 23:00:52 -0600
committerLuke Kanies <luke@madstop.com>2008-02-12 23:00:52 -0600
commitbe58bb5c4bc19e59685e0a8953eaf2d3b7844110 (patch)
tree6a2dd1fc88f97f4a76cd19d2459eb88408c877bf /test/lib/puppettest.rb
parent11ef70aa357a081fd14158e70acc8d943b5caffa (diff)
parent98dbfa2865ad270d5fd9821c6518f6f30ce9aec4 (diff)
downloadpuppet-be58bb5c4bc19e59685e0a8953eaf2d3b7844110.tar.gz
puppet-be58bb5c4bc19e59685e0a8953eaf2d3b7844110.tar.xz
puppet-be58bb5c4bc19e59685e0a8953eaf2d3b7844110.zip
Merge branch '0.24.x'
Diffstat (limited to 'test/lib/puppettest.rb')
-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.