File tree Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Original file line number Diff line number Diff line change 12
12
it { is_expected . to run . with_params ( [ ] ) . and_raise_error ( Puppet ::ParseError , %r{Requires hash to work with} ) } if Puppet . version < '5.5.0'
13
13
it { is_expected . to run . with_params ( { } ) . and_return ( [ ] ) }
14
14
it { is_expected . to run . with_params ( 'key' => 'value' ) . and_return ( [ 'key' ] ) }
15
- it 'returns the array of keys' , if : Puppet . version < '5.5.0' do
16
- result = subject . call ( [ { 'key1' => 'value1' , 'key2' => 'value2' } ] )
17
- expect ( result ) . to match_array ( %w[ key1 key2 ] )
18
- end
19
15
20
- it 'runs with UTF8 and double byte characters' , if : Puppet . version < '5.5.0' do
21
- result = subject . call ( [ { 'ҝểү' => '√ẳŀμệ' , 'キー' => '値' } ] )
22
- expect ( result ) . to match_array ( %w[ ҝểү キー ] )
16
+ if Puppet . version < '5.5.0'
17
+ it 'returns the array of keys' do
18
+ result = subject . call ( [ { 'key1' => 'value1' , 'key2' => 'value2' } ] )
19
+ expect ( result ) . to match_array ( %w[ key1 key2 ] )
20
+ end
21
+
22
+ it 'runs with UTF8 and double byte characters' , :if => Puppet . version < '5.5.0' do
23
+ result = subject . call ( [ { 'ҝểү' => '√ẳŀμệ' , 'キー' => '値' } ] )
24
+ expect ( result ) . to match_array ( %w[ ҝểү キー ] )
25
+ end
23
26
end
24
27
end
Original file line number Diff line number Diff line change 12
12
it { is_expected . to run . with_params ( [ ] ) . and_raise_error ( Puppet ::ParseError , %r{Requires hash to work with} ) } if Puppet . version < '5.5.0'
13
13
it { is_expected . to run . with_params ( { } ) . and_return ( [ ] ) }
14
14
it { is_expected . to run . with_params ( 'key' => 'value' ) . and_return ( [ 'value' ] ) }
15
- it 'returns the array of values' , if : Puppet . version < '5.5.0' do
16
- result = subject . call ( [ { 'key1' => 'value1' , 'key2' => 'value2' , 'duplicate_value_key' => 'value2' } ] )
17
- expect ( result ) . to match_array ( %w[ value1 value2 value2 ] )
18
- end
19
15
20
- it 'runs with UTF8 and double byte characters' , if : Puppet . version < '5.5.0' do
21
- result = subject . call ( [ { 'かぎ' => '使用' , 'ҝĕұ' => '√ẩŀứệ' , 'ҝĕұďŭрļǐçằťè' => '√ẩŀứệ' } ] )
22
- expect ( result ) . to match_array ( [ '使用' , '√ẩŀứệ' , '√ẩŀứệ' ] )
16
+ if Puppet . version < '5.5.0'
17
+ it 'returns the array of values' do
18
+ result = subject . call ( [ { 'key1' => 'value1' , 'key2' => 'value2' , 'duplicate_value_key' => 'value2' } ] )
19
+ expect ( result ) . to match_array ( %w[ value1 value2 value2 ] )
20
+ end
21
+ it 'runs with UTF8 and double byte characters' do
22
+ result = subject . call ( [ { 'かぎ' => '使用' , 'ҝĕұ' => '√ẩŀứệ' , 'ҝĕұďŭрļǐçằťè' => '√ẩŀứệ' } ] )
23
+ expect ( result ) . to match_array ( [ '使用' , '√ẩŀứệ' , '√ẩŀứệ' ] )
24
+ end
23
25
end
24
26
end
You can’t perform that action at this time.
0 commit comments