|
20 | 20 | it { is_expected.to run.with_params([]).and_return([]) }
|
21 | 21 | it { is_expected.to run.with_params(['a']).and_return(['a']) }
|
22 | 22 | it { is_expected.to run.with_params(['one']).and_return(['one']) }
|
23 |
| - it { is_expected.to run.with_params(['one', 'two', 'three']).and_return(['two', 'one', 'three']) } |
24 |
| - it { is_expected.to run.with_params(['one', 'two', 'three', 'four']).and_return(['four', 'three', 'two', 'one']) } |
25 | 23 |
|
26 |
| - it { is_expected.to run.with_params('').and_return('') } |
27 |
| - it { is_expected.to run.with_params('a').and_return('a') } |
28 |
| - it { is_expected.to run.with_params('abc').and_return('bac') } |
29 |
| - it { is_expected.to run.with_params('abcd').and_return('dcba') } |
| 24 | + if Puppet::PUPPETVERSION[0].to_i < 8 |
| 25 | + it { is_expected.to run.with_params(['one', 'two', 'three']).and_return(['two', 'one', 'three']) } |
| 26 | + it { is_expected.to run.with_params(['one', 'two', 'three', 'four']).and_return(['four', 'three', 'two', 'one']) } |
30 | 27 |
|
31 |
| - context 'with UTF8 and double byte characters' do |
32 |
| - it { is_expected.to run.with_params('ůţƒ8 ŧέχŧ şŧґíńģ').and_return('ģńş ůχţέƒŧí8ґŧŧ ') } |
33 |
| - it { is_expected.to run.with_params('日本語の文字列').and_return('字本日語文列の') } |
34 |
| - end |
| 28 | + it { is_expected.to run.with_params('').and_return('') } |
| 29 | + it { is_expected.to run.with_params('a').and_return('a') } |
| 30 | + it { is_expected.to run.with_params('abc').and_return('bac') } |
| 31 | + it { is_expected.to run.with_params('abcd').and_return('dcba') } |
| 32 | + |
| 33 | + context 'with UTF8 and double byte characters' do |
| 34 | + it { is_expected.to run.with_params('ůţƒ8 ŧέχŧ şŧґíńģ').and_return('ģńş ůχţέƒŧí8ґŧŧ ') } |
| 35 | + it { is_expected.to run.with_params('日本語の文字列').and_return('字本日語文列の') } |
| 36 | + end |
| 37 | + |
| 38 | + context 'when using a class extending String' do |
| 39 | + it { is_expected.to run.with_params(AlsoString.new('asdfghjkl')).and_return('lkhdsfajg') } |
| 40 | + end |
| 41 | + else |
| 42 | + it { is_expected.to run.with_params(['one', 'two', 'three']).and_return(['one', 'three', 'two']) } |
| 43 | + it { is_expected.to run.with_params(['one', 'two', 'three', 'four']).and_return(['one', 'three', 'two', 'four']) } |
| 44 | + |
| 45 | + it { is_expected.to run.with_params('b').and_return('b') } |
| 46 | + it { is_expected.to run.with_params('abc').and_return('acb') } |
| 47 | + it { is_expected.to run.with_params('abcd').and_return('acbd') } |
| 48 | + |
| 49 | + context 'with UTF8 and double byte characters' do |
| 50 | + it { is_expected.to run.with_params('ůţƒ8 ŧέχŧ şŧґíńģ').and_return('ŧńş ģχţέƒůí8ґŧŧ ') } |
| 51 | + it { is_expected.to run.with_params('日本語の文字列').and_return('日列語字本文の') } |
| 52 | + end |
35 | 53 |
|
36 |
| - context 'when using a class extending String' do |
37 |
| - it { is_expected.to run.with_params(AlsoString.new('asdfghjkl')).and_return('lkhdsfajg') } |
| 54 | + context 'when using a class extending String' do |
| 55 | + it { is_expected.to run.with_params(AlsoString.new('asdfghjkl')).and_return('lakfdgjsh') } |
| 56 | + end |
38 | 57 | end
|
39 | 58 | end
|
40 | 59 | end
|
0 commit comments