X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fnum2bool_spec.rb;fp=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fnum2bool_spec.rb;h=60533e39008db6df7b0fb5a74f68524b9881179b;hb=131e09855e065be940e104d9ab0f18940cc76257;hp=494afff9fc3ef9f9622eb97f46f1807487f3a259;hpb=407d322498f4fde815abf381007fbecfe5c10b2b;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/functions/num2bool_spec.rb b/3rdparty/modules/stdlib/spec/functions/num2bool_spec.rb old mode 100755 new mode 100644 index 494afff9f..60533e390 --- a/3rdparty/modules/stdlib/spec/functions/num2bool_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/num2bool_spec.rb @@ -2,9 +2,9 @@ require 'spec_helper' describe 'num2bool' do it { is_expected.not_to eq(nil) } - it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } - it { is_expected.to run.with_params(1, 2).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } - it { is_expected.to run.with_params('abc').and_raise_error(Puppet::ParseError, /does not look like a number/) } + it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } + it { is_expected.to run.with_params(1, 2).and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } + it { is_expected.to run.with_params('abc').and_raise_error(Puppet::ParseError, %r{does not look like a number}) } it { is_expected.to run.with_params(1).and_return(true) } it { is_expected.to run.with_params('1').and_return(true) } it { is_expected.to run.with_params(1.5).and_return(true) } @@ -16,7 +16,7 @@ describe 'num2bool' do it { is_expected.to run.with_params(0).and_return(false) } it { is_expected.to run.with_params('0').and_return(false) } it { is_expected.to run.with_params([]).and_return(false) } - it { is_expected.to run.with_params('[]').and_raise_error(Puppet::ParseError, /does not look like a number/) } + it { is_expected.to run.with_params('[]').and_raise_error(Puppet::ParseError, %r{does not look like a number}) } it { is_expected.to run.with_params({}).and_return(false) } - it { is_expected.to run.with_params('{}').and_raise_error(Puppet::ParseError, /does not look like a number/) } + it { is_expected.to run.with_params('{}').and_raise_error(Puppet::ParseError, %r{does not look like a number}) } end