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
407 |
# File 'lib/rspec-puppet/monkey_patches.rb', line 407 alias old_require require |
#require(path) ⇒ Object
408 409 410 411 412 413 |
# File 'lib/rspec-puppet/monkey_patches.rb', line 408 def require(path) return if ['puppet/util/windows', 'win32/registry'].include?(path) && RSpec::Puppet.rspec_puppet_example? && Puppet::Util::Platform.pretend_windows? old_require(path) end |