X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fceiling_spec.rb;h=7f9a0450a354fc0d69aa2f8e47009c5fcc9ff21c;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hp=567426fd39756b5e74972a04b0f6978999ff3b7e;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/functions/ceiling_spec.rb b/3rdparty/modules/stdlib/spec/functions/ceiling_spec.rb old mode 100755 new mode 100644 index 567426fd3..7f9a0450a --- a/3rdparty/modules/stdlib/spec/functions/ceiling_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/ceiling_spec.rb @@ -1,13 +1,13 @@ require 'spec_helper' -describe 'ceiling' do +describe 'ceiling', :if => Puppet::Util::Package.versioncmp(Puppet.version, '6.0.0') < 0 do it { is_expected.not_to eq(nil) } - it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError) } - it { is_expected.to run.with_params("foo").and_raise_error(Puppet::ParseError) } - it { is_expected.to run.with_params([]).and_raise_error(Puppet::ParseError) } + it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) } + it { is_expected.to run.with_params('foo').and_raise_error(Puppet::ParseError, %r{Wrong argument type given}) } + it { is_expected.to run.with_params([]).and_raise_error(Puppet::ParseError, %r{Wrong argument type given}) } it { is_expected.to run.with_params(34).and_return(34) } it { is_expected.to run.with_params(-34).and_return(-34) } it { is_expected.to run.with_params(33.1).and_return(34) } it { is_expected.to run.with_params(-33.1).and_return(-33) } + it { is_expected.to run.with_params('33.1').and_return(34) } end -