Merge pull request #842 from tphoney/remove_unsupported_code
[puppet-modules/puppetlabs-apt.git] / spec / spec_helper.rb
index a7281d530037b7c417fa03ab50dad09176ff2b1d..0d5efc0be24af0796472c8f21fe7b1246c3c5a3f 100644 (file)
@@ -32,12 +32,15 @@ RSpec.configure do |c|
     # by default Puppet runs at warning level
     Puppet.settings[:strict] = :warning
   end
+  c.filter_run_excluding(bolt: true) unless ENV['GEM_BOLT']
+  c.after(:suite) do
+  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)
+    last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module, false)
+    last_module.const_get(next_module, false)
   end
 end