aboutsummaryrefslogtreecommitdiff
path: root/spec/spec_helper_local.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/spec_helper_local.rb')
-rw-r--r--spec/spec_helper_local.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/spec_helper_local.rb b/spec/spec_helper_local.rb
new file mode 100644
index 0000000..86c87f0
--- /dev/null
+++ b/spec/spec_helper_local.rb
@@ -0,0 +1,19 @@
+dir = File.expand_path(File.dirname(__FILE__))
+$LOAD_PATH.unshift File.join(dir, 'lib')
+
+# So everyone else doesn't have to include this base constant.
+module PuppetSpec
+ FIXTURE_DIR = File.join(File.expand_path(File.dirname(__FILE__)), 'fixtures') unless defined?(FIXTURE_DIR)
+end
+
+require 'puppet_spec/files'
+
+Pathname.glob("#{dir}/shared_behaviours/**/*.rb") do |behaviour|
+ require behaviour.relative_path_from(Pathname.new(dir))
+end
+
+RSpec.configure do |c|
+ c.after :each do
+ PuppetSpec::Files.cleanup
+ end
+end