X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Ffloor_spec.rb;h=e87a601f9ebf1f8c108e1101e895db2d48ac113d;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hp=608c602faa9f42771a8c8b061d2a7dcbc977ca95;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/functions/floor_spec.rb b/3rdparty/modules/stdlib/spec/functions/floor_spec.rb old mode 100755 new mode 100644 index 608c602fa..e87a601f9 --- a/3rdparty/modules/stdlib/spec/functions/floor_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/floor_spec.rb @@ -1,10 +1,11 @@ require 'spec_helper' -describe 'floor' do +describe 'floor', :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}) } + it { is_expected.to run.with_params([]).and_raise_error(Puppet::ParseError, %r{Wrong argument type}) } + 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(33) }