4 it { is_expected.not_to eq(nil) }
5 it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError) }
6 it { is_expected.to run.with_params([1]).and_raise_error(Puppet::ParseError) }
7 it { is_expected.to run.with_params(1, [2]).and_raise_error(Puppet::ParseError) }
8 it { is_expected.to run.with_params([1], [2], [3]).and_return([1, 2, 3]) }
9 it { is_expected.to run.with_params(['1', '2', '3'], ['4', '5', '6']).and_return(['1', '2', '3', '4', '5', '6']) }
10 it { is_expected.to run.with_params(['1', '2', '3'], '4').and_return(['1', '2', '3', '4']) }
11 it { is_expected.to run.with_params(['1', '2', '3'], [['4', '5'], '6']).and_return(['1', '2', '3', ['4', '5'], '6']) }
12 it { is_expected.to run.with_params(['1', '2'], ['3', '4'], ['5', '6']).and_return(['1', '2', '3', '4', '5', '6']) }
13 it { is_expected.to run.with_params(['1', '2'], '3', '4', ['5', '6']).and_return(['1', '2', '3', '4', '5', '6']) }
15 context 'with UTF8 and double byte characters' do
16 it { is_expected.to run.with_params([{ 'a' => 'b' }], 'c' => 'd', 'e' => 'f').and_return([{ 'a' => 'b' }, { 'c' => 'd', 'e' => 'f' }]) }
17 it { is_expected.to run.with_params(['ấ', 'β', '©'], ['đ', 'ể', '文字列']).and_return(['ấ', 'β', '©', 'đ', 'ể', '文字列']) }
20 arguments = [['1', '2', '3'], ['4', '5', '6']]
21 originals = [arguments[0].dup, arguments[1].dup]
22 it 'leaves the original array intact' do
23 _result = subject.execute(arguments[0], arguments[1])
24 arguments.each_with_index do |argument, index|
25 expect(argument).to eq(originals[index])