Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
3afcc85
)
[MODULES-4528] Replace Puppet.version.to_f with Puppet::Util::Package.versioncmp
MODULES-4528
author
Wilson McCoubrey
<wilson@puppet.com>
Thu, 16 Mar 2017 11:27:49 +0000
(11:27 +0000)
committer
Wilson McCoubrey
<wilson@puppet.com>
Thu, 16 Mar 2017 15:25:58 +0000
(15:25 +0000)
spec/defines/setting_spec.rb
patch
|
blob
|
history
diff --git
a/spec/defines/setting_spec.rb
b/spec/defines/setting_spec.rb
index e1163a0df894f6c3ce5709888e960ae62ae6d8ac..c0aad8e4601200c62061d085f401f1abaff33771 100644
(file)
--- a/
spec/defines/setting_spec.rb
+++ b/
spec/defines/setting_spec.rb
@@
-95,7
+95,7
@@
describe 'apt::setting' do
context 'with priority=1.2' do
let(:params) { default_params.merge({ :priority => 1.2 }) }
- if Puppet
.version.to_f >= 4.
0 || ENV["FUTURE_PARSER"] == 'yes'
+ if Puppet
::Util::Package.versioncmp(Puppet.version, '4.0') >=
0 || ENV["FUTURE_PARSER"] == 'yes'
it { is_expected.to compile.and_raise_error(/input needs to be a String/) }
else
it { is_expected.to compile.and_raise_error(/priority must be an integer or a zero-padded integer/) }