From 34e83e11a5fc344195217d9cd159d022b5d89ec1 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 9 Jul 2018 19:45:51 -0700 Subject: Add local spec_helper --- spec/spec_helper_local.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 spec/spec_helper_local.rb diff --git a/spec/spec_helper_local.rb b/spec/spec_helper_local.rb new file mode 100644 index 0000000..0fcc231 --- /dev/null +++ b/spec/spec_helper_local.rb @@ -0,0 +1,13 @@ +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 -- cgit v1.2.3