From: Ashley Penney Date: Fri, 20 Dec 2013 19:43:22 +0000 (-0500) Subject: Handle the change to Puppet::Provider::Config in 3.4. X-Git-Tag: 0.5.0~23^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a0b3ee856fa350b64dc5641f0d6c8e0bfce67235;p=puppet-modules%2Fpuppetlabs-firewall.git Handle the change to Puppet::Provider::Config in 3.4. --- diff --git a/spec/unit/puppet/provider/iptables_chain_spec.rb b/spec/unit/puppet/provider/iptables_chain_spec.rb index 11aa57b..f350c2e 100755 --- a/spec/unit/puppet/provider/iptables_chain_spec.rb +++ b/spec/unit/puppet/provider/iptables_chain_spec.rb @@ -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 diff --git a/spec/unit/puppet/provider/iptables_spec.rb b/spec/unit/puppet/provider/iptables_spec.rb index 4248cdb..d4dcea5 100644 --- a/spec/unit/puppet/provider/iptables_spec.rb +++ b/spec/unit/puppet/provider/iptables_spec.rb @@ -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