]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Handle the change to Puppet::Provider::Config in 3.4.
authorAshley Penney <ashley.penney@puppetlabs.com>
Fri, 20 Dec 2013 19:43:22 +0000 (14:43 -0500)
committerAshley Penney <ashley.penney@puppetlabs.com>
Fri, 20 Dec 2013 19:45:29 +0000 (14:45 -0500)
spec/unit/puppet/provider/iptables_chain_spec.rb
spec/unit/puppet/provider/iptables_spec.rb

index 11aa57b93c8785a5f258797ed929f97b98b7e41b..f350c2e3c58068799413187043c32874bd226e6e 100755 (executable)
@@ -1,12 +1,22 @@
 #!/usr/bin/env rspec
 
 require 'spec_helper'
-require 'puppet'
+if Puppet.version < '3.4.0'
+  require 'puppet/provider/confine/exists'
+else
+  require 'puppet/confine/exists'
+end
 
 describe 'iptables chain provider detection' do
-  let(:exists) {
-    Puppet::Provider::Confine::Exists
-  }
+  if Puppet.version < '3.4.0'
+    let(:exists) {
+      Puppet::Provider::Confine::Exists
+    }
+  else
+    let(:exists) {
+      Puppet::Confine::Exists
+    }
+  end
 
   before :each do
     # Reset the default provider
index 4248cdb07e8e251953f7dd1f425fe5fd77ff7cd2..d4dcea57cae33132ded9cd0d3b8ac1a37ff0b6e5 100644 (file)
@@ -1,12 +1,22 @@
 #!/usr/bin/env rspec
 
 require 'spec_helper'
-#require 'puppet/provider/confine/exists'
+if Puppet.version < '3.4.0'
+  require 'puppet/provider/confine/exists'
+else
+  require 'puppet/confine/exists'
+end
 
 describe 'iptables provider detection' do
-  let(:exists) {
-    Puppet::Provider::Confine::Exists
-  }
+  if Puppet.version < '3.4.0'
+    let(:exists) {
+      Puppet::Provider::Confine::Exists
+    }
+  else
+    let(:exists) {
+      Puppet::Confine::Exists
+    }
+  end
 
   before :each do
     # Reset the default provider