Module: Puppet::Util
- Defined in:
- lib/rspec-puppet/monkey_patches.rb
Defined Under Namespace
Modules: Platform Classes: Autoload
Class Method Summary collapse
- .default_env ⇒ Object
- .get_env(name, mode = default_env) ⇒ Object
- .old_get_env ⇒ Object
- .old_path_to_uri ⇒ Object
- .path_to_uri(*args) ⇒ Object
Class Method Details
.default_env ⇒ Object
| 126 127 128 | # File 'lib/rspec-puppet/monkey_patches.rb', line 126 def default_env DEFAULT_ENV end | 
.get_env(name, mode = default_env) ⇒ Object
| 136 137 138 139 140 141 142 143 | # File 'lib/rspec-puppet/monkey_patches.rb', line 136 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_env ⇒ Object
| 133 | # File 'lib/rspec-puppet/monkey_patches.rb', line 133 alias old_get_env get_env | 
.old_path_to_uri ⇒ Object
| 148 | # File 'lib/rspec-puppet/monkey_patches.rb', line 148 alias old_path_to_uri path_to_uri | 
.path_to_uri(*args) ⇒ Object
| 151 152 153 154 155 156 157 158 159 | # File 'lib/rspec-puppet/monkey_patches.rb', line 151 def path_to_uri(*args) if RSpec::Puppet.rspec_puppet_example? RSpec::Puppet::Consts.without_stubs do old_path_to_uri(*args) end else old_path_to_uri(*args) end end |