X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fshuffle_spec.rb;h=a3b68a856e0ed7f6a4e2a95b4086cd9fe3d790da;hb=131e09855e065be940e104d9ab0f18940cc76257;hp=4673daaa68701aee902a15a6573912a32e545348;hpb=407d322498f4fde815abf381007fbecfe5c10b2b;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/functions/shuffle_spec.rb b/3rdparty/modules/stdlib/spec/functions/shuffle_spec.rb old mode 100755 new mode 100644 index 4673daaa6..a3b68a856 --- a/3rdparty/modules/stdlib/spec/functions/shuffle_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/shuffle_spec.rb @@ -2,14 +2,14 @@ require 'spec_helper' describe 'shuffle' 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.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } it { - pending("Current implementation ignores parameters after the first.") - is_expected.to run.with_params([], 'extra').and_raise_error(Puppet::ParseError, /wrong number of arguments/i) + pending('Current implementation ignores parameters after the first.') + is_expected.to run.with_params([], 'extra').and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } - it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, /Requires either array or string to work/) } - it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, /Requires either array or string to work/) } - it { is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, /Requires either array or string to work/) } + it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, %r{Requires either array or string to work}) } + it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, %r{Requires either array or string to work}) } + it { is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, %r{Requires either array or string to work}) } context 'when running with a specific seed' do # make tests deterministic @@ -26,7 +26,7 @@ describe 'shuffle' do it { is_expected.to run.with_params('abc').and_return('bac') } it { is_expected.to run.with_params('abcd').and_return('dcba') } - context 'should run with UTF8 and double byte characters' do + context 'with UTF8 and double byte characters' do it { is_expected.to run.with_params('ůţƒ8 ŧέχŧ şŧґíńģ').and_return('ģńş ůχţέƒŧí8ґŧŧ ') } it { is_expected.to run.with_params('日本語の文字列').and_return('字本日語文列の') } end