Update puppetlabs/stdlib module
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / functions / shuffle_spec.rb
old mode 100755 (executable)
new mode 100644 (file)
index 4673daa..a3b68a8
@@ -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