Module: Kernel
- Defined in:
- lib/rspec-puppet/monkey_patches.rb
Overview
Prevent Puppet from requiring ‘puppet/util/windows’ if we’re pretending to be windows, otherwise it will require other libraries that probably won’t be available on non-windows hosts.
Instance Method Summary collapse
Instance Method Details
#old_require ⇒ Object
171 |
# File 'lib/rspec-puppet/monkey_patches.rb', line 171 alias :old_require :require |
#require(path) ⇒ Object
172 173 174 175 |
# File 'lib/rspec-puppet/monkey_patches.rb', line 172 def require(path) return if path == 'puppet/util/windows' && Puppet::Util::Platform.pretend_windows? old_require(path) end |