summaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index bfac9095f..c98709597 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,8 +1,14 @@
dir = File.expand_path(File.dirname(__FILE__))
-$LOAD_PATH.unshift("#{dir}/lib")
+
+$LOAD_PATH.unshift("#{dir}/")
$LOAD_PATH.unshift("#{dir}/../lib")
$LOAD_PATH.unshift("#{dir}/../test/lib") # Add the old test dir, so that we can still find our local mocha and spec
+# include any gems in vendor/gems
+Dir["#{dir}/../vendor/gems/**"].map do |path|
+ $LOAD_PATH.unshift(File.directory?(lib = "#{dir}/lib") ? lib : path)
+end
+
require 'puppettest'
require 'puppettest/runnable_test'
require 'mocha'
@@ -19,4 +25,5 @@ Spec::Runner.configure do |config|
end
end
-require "#{dir}/lib/monkey_patches/add_confine_and_runnable_to_rspec_dsl"
+# load any monkey-patches
+Dir["#{dir}/monkey_patches/*.rb"].map { |file| require file }