Module: Puppet::Util

Defined in:
lib/rspec-puppet/monkey_patches.rb

Defined Under Namespace

Modules: Platform

Class Method Summary collapse

Class Method Details

.get_env(name, mode = default_env) ⇒ Object



117
118
119
120
121
122
123
124
# File 'lib/rspec-puppet/monkey_patches.rb', line 117

def get_env(name, mode = default_env)
  if RSpec::Puppet.rspec_puppet_example?
    # use the actual platform, not the pretended
   old_get_env(name, Platform.actual_platform)
  else
   old_get_env(name, mode)
  end
end

.old_get_envObject



114
# File 'lib/rspec-puppet/monkey_patches.rb', line 114

alias :old_get_env :get_env