aboutsummaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 2d5f003..e69d11d 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,3 +1,4 @@
+
require 'puppetlabs_spec_helper/module_spec_helper'
require 'rspec-puppet-facts'
@@ -33,3 +34,12 @@ RSpec.configure do |c|
Puppet.settings[:strict] = :warning
end
end
+
+def ensure_module_defined(module_name)
+ module_name.split('::').reduce(Object) do |last_module, next_module|
+ last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module)
+ last_module.const_get(next_module)
+ end
+end
+
+# 'spec_overrides' from sync.yml will appear below this line