diff options
author | Josh Cooper <josh@puppet.com> | 2018-07-09 19:45:51 -0700 |
---|---|---|
committer | Josh Cooper <josh@puppet.com> | 2018-07-09 19:45:51 -0700 |
commit | 34e83e11a5fc344195217d9cd159d022b5d89ec1 (patch) | |
tree | bceb6427e54e50ed8523705408aadc47a15e8b45 /spec | |
parent | 2ac89832b7e065df4490d81b3080b2b570a172ad (diff) | |
download | puppet-hosts_core-34e83e11a5fc344195217d9cd159d022b5d89ec1.tar.gz puppet-hosts_core-34e83e11a5fc344195217d9cd159d022b5d89ec1.tar.bz2 |
Add local spec_helper
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec_helper_local.rb | 13 |
1 files changed, 13 insertions, 0 deletions
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 |