summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-12 23:00:40 -0600
committerLuke Kanies <luke@madstop.com>2008-02-12 23:00:40 -0600
commit98dbfa2865ad270d5fd9821c6518f6f30ce9aec4 (patch)
tree16b9015f4fc939838d83212803ac6f8461bf1bfd /test
parent12fa0fa387798e017641d7df8cf6cdc060032aed (diff)
downloadpuppet-98dbfa2865ad270d5fd9821c6518f6f30ce9aec4.tar.gz
puppet-98dbfa2865ad270d5fd9821c6518f6f30ce9aec4.tar.xz
puppet-98dbfa2865ad270d5fd9821c6518f6f30ce9aec4.zip
Loading the mocha gem from the puppettest.rb file.
Diffstat (limited to 'test')
-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.