summaryrefslogtreecommitdiff
path: root/spec/functions/ensure_resource_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/functions/ensure_resource_spec.rb')
-rwxr-xr-xspec/functions/ensure_resource_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/functions/ensure_resource_spec.rb b/spec/functions/ensure_resource_spec.rb
index fddc4c4..5366205 100755
--- a/spec/functions/ensure_resource_spec.rb
+++ b/spec/functions/ensure_resource_spec.rb
@@ -4,7 +4,7 @@ describe 'ensure_resource' do
it { is_expected.not_to eq(nil) }
it { is_expected.to run.with_params().and_raise_error(ArgumentError, /Must specify a type/) }
it { is_expected.to run.with_params('type').and_raise_error(ArgumentError, /Must specify a title/) }
- if Puppet.version.to_f >= 4.6
+ if Puppet::Util::Package.versioncmp(Puppet.version, '4.6.0') >= 0
it { is_expected.to run.with_params('type', 'title', {}, 'extras').and_raise_error(ArgumentError) }
else
it { is_expected.to run.with_params('type', 'title', {}, 'extras').and_raise_error(Puppet::ParseError) }