Class: Puppet::Type
- Inherits:
-
Object
- Object
- Puppet::Type
- Defined in:
- lib/rspec-puppet/monkey_patches.rb
Overview
Allow rspec-puppet to prevent Puppet::Type from automatically picking a provider for a resource. We need to do this because in order to fully resolve the graph edges, we have to convert the Puppet::Resource objects into Puppet::Type objects so that their autorequires are evaluated. We need to prevent provider code from being called during this process as it’s very platform specific.
Class Method Summary collapse
Class Method Details
.suppress_provider ⇒ Object
106 107 108 |
# File 'lib/rspec-puppet/monkey_patches.rb', line 106 def self.suppress_provider @suppress_provider = true end |
.suppress_provider? ⇒ Boolean
102 103 104 |
# File 'lib/rspec-puppet/monkey_patches.rb', line 102 def self.suppress_provider? @suppress_provider ||= false end |
.unsuppress_provider ⇒ Object
110 111 112 |
# File 'lib/rspec-puppet/monkey_patches.rb', line 110 def self.unsuppress_provider @suppress_provider = false end |