Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for Puppet > 3 && < 3.1

From @jmslagle's PR #61
  • Loading branch information...
commit d5c63b8b9a5f89f4af4d77e89a00de22f153584b 1 parent 102a9e8
@rodjek authored
Showing with 4 additions and 4 deletions.
  1. +0 −4 lib/rspec-puppet.rb
  2. +4 −0 lib/rspec-puppet/support.rb
View
4 lib/rspec-puppet.rb
@@ -6,10 +6,6 @@
require 'rspec-puppet/example'
require 'rspec-puppet/setup'
-if Integer(Puppet.version.split('.').first) >= 3
- Puppet.initialize_settings
-end
-
RSpec.configure do |c|
c.add_setting :module_path, :default => '/etc/puppet/modules'
c.add_setting :manifest_dir, :default => nil
View
4 lib/rspec-puppet/support.rb
@@ -5,6 +5,10 @@ module Support
protected
def build_catalog_without_cache(nodename, facts_val, code)
+ if Integer(Puppet.version.split('.').first) >= 3
+ Puppet.initialize_settings
+ end
+
Puppet[:code] = code
node_obj = Puppet::Node.new(nodename)
Please sign in to comment.
Something went wrong with that request. Please try again.