X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fbool2str_spec.rb;fp=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fbool2str_spec.rb;h=8d8f9b5bc8149409e14f406643a0c1925d8e30eb;hb=131e09855e065be940e104d9ab0f18940cc76257;hp=23a754ba4f6eef948e1f6bb181ee54d380cbb6e1;hpb=407d322498f4fde815abf381007fbecfe5c10b2b;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/functions/bool2str_spec.rb b/3rdparty/modules/stdlib/spec/functions/bool2str_spec.rb old mode 100755 new mode 100644 index 23a754ba4..8d8f9b5bc --- a/3rdparty/modules/stdlib/spec/functions/bool2str_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/bool2str_spec.rb @@ -2,16 +2,15 @@ require 'spec_helper' describe 'bool2str' do it { is_expected.not_to eq(nil) } - it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError) } - [ 'true', 'false', nil, :undef, ''].each do |invalid| + it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError) } + ['true', 'false', nil, :undef, ''].each do |invalid| it { is_expected.to run.with_params(invalid).and_raise_error(Puppet::ParseError) } end it { is_expected.to run.with_params(true, 'yes', 'no', 'maybe').and_raise_error(Puppet::ParseError) } it { is_expected.to run.with_params(true, 'maybe').and_raise_error(Puppet::ParseError) } it { is_expected.to run.with_params(true, 0, 1).and_raise_error(Puppet::ParseError) } - it { is_expected.to run.with_params(true).and_return("true") } - it { is_expected.to run.with_params(false).and_return("false") } - it { is_expected.to run.with_params(true, 'yes', 'no').and_return("yes") } - it { is_expected.to run.with_params(false, 'yes', 'no').and_return("no") } - + it { is_expected.to run.with_params(true).and_return('true') } + it { is_expected.to run.with_params(false).and_return('false') } + it { is_expected.to run.with_params(true, 'yes', 'no').and_return('yes') } + it { is_expected.to run.with_params(false, 'yes', 'no').and_return('no') } end