From a0b3ee856fa350b64dc5641f0d6c8e0bfce67235 Mon Sep 17 00:00:00 2001 From: Ashley Penney Date: Fri, 20 Dec 2013 14:43:22 -0500 Subject: [PATCH] Handle the change to Puppet::Provider::Config in 3.4. --- .../puppet/provider/iptables_chain_spec.rb | 18 ++++++++++++++---- spec/unit/puppet/provider/iptables_spec.rb | 18 ++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) 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 -- 2.45.2