Skip to content

Commit 76b40d3

Browse files
committed
(CONT-801) Correct RSpec/EmptyLineAfterExample
1 parent 303d7b0 commit 76b40d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+161
-6
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,6 @@ RSpec/ContextWording:
140140
RSpec/DescribeClass:
141141
Enabled: false
142142

143-
# Offense count: 161
144-
# This cop supports safe autocorrection (--autocorrect).
145-
# Configuration parameters: AllowConsecutiveOneLiners.
146-
RSpec/EmptyLineAfterExample:
147-
Enabled: false
148-
149143
# Offense count: 25
150144
# This cop supports safe autocorrection (--autocorrect).
151145
RSpec/EmptyLineAfterExampleGroup:

spec/functions/base64_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,42 @@
2727
is_expected.to run.with_params('encode', 'a very long string that will cause the base64 encoder to produce output with multiple lines')
2828
.and_return("YSB2ZXJ5IGxvbmcgc3RyaW5nIHRoYXQgd2lsbCBjYXVzZSB0aGUgYmFzZTY0\nIGVuY29kZXIgdG8gcHJvZHVjZSBvdXRwdXQgd2l0aCBtdWx0aXBsZSBsaW5l\ncw==\n")
2929
}
30+
3031
it {
3132
is_expected.to run.with_params('decode', "YSB2ZXJ5IGxvbmcgc3RyaW5nIHRoYXQgd2lsbCBjYXVzZSB0aGUgYmFzZTY0\nIGVuY29kZXIgdG8gcHJvZHVjZSBvdXRwdXQgd2l0aCBtdWx0aXBsZSBsaW5l\ncw==\n")
3233
.and_return('a very long string that will cause the base64 encoder to produce output with multiple lines')
3334
}
35+
3436
it {
3537
is_expected.to run.with_params('decode', 'YSB2ZXJ5IGxvbmcgc3RyaW5nIHRoYXQgd2lsbCBjYXVzZSB0aGUgYmFzZTY0IGVuY29kZXIgdG8gcHJvZHVjZSBvdXRwdXQgd2l0aCBtdWx0aXBsZSBsaW5lcw==')
3638
.and_return('a very long string that will cause the base64 encoder to produce output with multiple lines')
3739
}
40+
3841
it {
3942
is_expected.to run.with_params('encode', 'a very long string that will cause the base64 encoder to produce output with multiple lines', 'strict')
4043
.and_return('YSB2ZXJ5IGxvbmcgc3RyaW5nIHRoYXQgd2lsbCBjYXVzZSB0aGUgYmFzZTY0IGVuY29kZXIgdG8gcHJvZHVjZSBvdXRwdXQgd2l0aCBtdWx0aXBsZSBsaW5lcw==')
4144
}
45+
4246
it {
4347
is_expected.to run.with_params('decode', 'YSB2ZXJ5IGxvbmcgc3RyaW5nIHRoYXQgd2lsbCBjYXVzZSB0aGUgYmFzZTY0IGVuY29kZXIgdG8gcHJvZHVjZSBvdXRwdXQgd2l0aCBtdWx0aXBsZSBsaW5lcw==', 'strict')
4448
.and_return('a very long string that will cause the base64 encoder to produce output with multiple lines')
4549
}
50+
4651
it {
4752
is_expected.to run.with_params('encode', 'https://www.google.com.tw/?gws_rd=ssl#q=hello+world', 'urlsafe')
4853
.and_return('aHR0cHM6Ly93d3cuZ29vZ2xlLmNvbS50dy8_Z3dzX3JkPXNzbCNxPWhlbGxvK3dvcmxk')
4954
}
55+
5056
it {
5157
is_expected.to run.with_params('decode', 'aHR0cHM6Ly93d3cuZ29vZ2xlLmNvbS50dy8_Z3dzX3JkPXNzbCNxPWhlbGxvK3dvcmxk', 'urlsafe')
5258
.and_return('https://www.google.com.tw/?gws_rd=ssl#q=hello+world')
5359
}
60+
5461
it {
5562
is_expected.to run.with_params('encode', 'https://github.com/puppetlabs/puppetlabs-stdlib/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+Add', 'urlsafe')
5663
.and_return('aHR0cHM6Ly9naXRodWIuY29tL3B1cHBldGxhYnMvcHVwcGV0bGFicy1zdGRsaWIvcHVsbHM_dXRmOD0lRTIlOUMlOTMmcT1pcyUzQXByK2lzJTNBb3BlbitBZGQ=')
5764
}
65+
5866
it {
5967
is_expected.to run.with_params('decode', 'aHR0cHM6Ly9naXRodWIuY29tL3B1cHBldGxhYnMvcHVwcGV0bGFicy1zdGRsaWIvcHVsbHM_dXRmOD0lRTIlOUMlOTMmcT1pcyUzQXByK2lzJTNBb3BlbitBZGQ=', 'urlsafe')
6068
.and_return('https://github.com/puppetlabs/puppetlabs-stdlib/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+Add')

spec/functions/batch_escape_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
describe 'escaping' do
1919
it { is_expected.to run.with_params('foo').and_return('"foo"') }
2020
it { is_expected.to run.with_params('foo bar').and_return('"foo bar"') }
21+
2122
it {
2223
is_expected.to run.with_params('~`!@#$%^&*()_-=[]\{}|;\':",./<>?')
2324
.and_return('"~`!@#\\$%^&*()_-=[]\\\{}|;\':"",./<>?"')

spec/functions/bool2str_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
describe 'bool2str' do
66
it { is_expected.not_to eq(nil) }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError) }
8+
89
['true', 'false', nil, :undef, ''].each do |invalid|
910
it { is_expected.to run.with_params(invalid).and_raise_error(Puppet::ParseError) }
1011
end

spec/functions/count_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
it { is_expected.to run.with_params.and_raise_error(ArgumentError) }
88
it { is_expected.to run.with_params('one').and_raise_error(ArgumentError) }
99
it { is_expected.to run.with_params('one', 'two').and_return(1) }
10+
1011
it {
1112
pending('should actually be like this, and not like above')
1213
is_expected.to run.with_params('one', 'two').and_raise_error(ArgumentError)
1314
}
15+
1416
it { is_expected.to run.with_params('one', 'two', 'three').and_raise_error(ArgumentError) }
1517
it { is_expected.to run.with_params(['one', 'two', 'three']).and_return(3) }
1618
it { is_expected.to run.with_params(['one', 'two', 'two'], 'two').and_return(2) }

spec/functions/deep_merge_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
.with_params({ 'key1' => 'value1', 'key2' => 'value2' }, 'key2' => 'replacement_value', 'key3' => 'value3') \
2121
.and_return('key1' => 'value1', 'key2' => 'replacement_value', 'key3' => 'value3')
2222
end
23+
2324
it {
2425
is_expected.to run \
2526
.with_params({ 'key1' => 'value1' }, { 'key1' => 'value2' }, 'key1' => 'value3') \
@@ -33,11 +34,13 @@
3334
.with_params({ 'key1' => 'value1' }, 'key2' => 'value2', 'key3' => { 'subkey1' => 'value4' }) \
3435
.and_return('key1' => 'value1', 'key2' => 'value2', 'key3' => { 'subkey1' => 'value4' })
3536
}
37+
3638
it {
3739
is_expected.to run \
3840
.with_params({ 'key1' => { 'subkey1' => 'value1' } }, 'key1' => { 'subkey2' => 'value2' }) \
3941
.and_return('key1' => { 'subkey1' => 'value1', 'subkey2' => 'value2' })
4042
}
43+
4144
it {
4245
is_expected.to run \
4346
.with_params({ 'key1' => { 'subkey1' => { 'subsubkey1' => 'value1' } } }, 'key1' => { 'subkey1' => { 'subsubkey1' => 'value2' } }) \

spec/functions/defined_with_params_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
it { is_expected.to run.with_params('Test::Deftype[foo]', {}).and_return(true) }
8989
it { is_expected.to run.with_params('Test::Deftype[bar]', {}).and_return(false) }
9090
it { is_expected.to run.with_params(Puppet::Resource.new('Test::Deftype[foo]'), {}).and_return(true) }
91+
9192
it {
9293
is_expected.to run.with_params(Puppet::Resource.new('Test::Deftype[bar]'), {}).and_return(false)
9394

spec/functions/delete_at_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
it { is_expected.to run.with_params('one', 1).and_raise_error(Puppet::ParseError, %r{Requires array}) }
99
it { is_expected.to run.with_params(1, 1).and_raise_error(Puppet::ParseError, %r{Requires array}) }
1010
it { is_expected.to run.with_params(['one'], 'two').and_raise_error(Puppet::ParseError, %r{You must provide non-negative numeric}) }
11+
1112
it {
1213
pending('Current implementation ignores parameters after the first two.')
1314
is_expected.to run.with_params(['one'], 0, 1).and_raise_error(Puppet::ParseError)

spec/functions/delete_regex_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@
3030
it { is_expected.to run.with_params({}, '').and_return({}) }
3131
it { is_expected.to run.with_params({}, 'key').and_return({}) }
3232
it { is_expected.to run.with_params({ 'key' => 'value' }, 'key').and_return({}) }
33+
3334
it {
3435
is_expected.to run \
3536
.with_params({ 'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3' }, 'key2') \
3637
.and_return('key1' => 'value1', 'key3' => 'value3')
3738
}
39+
3840
it {
3941
is_expected.to run \
4042
.with_params({ 'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3' }, ['key1', 'key2']) \
@@ -48,6 +50,7 @@
4850
subject.execute(argument1, 'two')
4951
expect(argument1).to eq(original1)
5052
end
53+
5154
it 'leaves the original hash intact' do
5255
argument1 = { 'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3' }
5356
original1 = argument1.dup

spec/functions/delete_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,19 @@
4343
it { is_expected.to run.with_params({}, '').and_return({}) }
4444
it { is_expected.to run.with_params({}, 'key').and_return({}) }
4545
it { is_expected.to run.with_params({ 'key' => 'value' }, 'key').and_return({}) }
46+
4647
it {
4748
is_expected.to run \
4849
.with_params({ 'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3' }, 'key2') \
4950
.and_return('key1' => 'value1', 'key3' => 'value3')
5051
}
52+
5153
it {
5254
is_expected.to run \
5355
.with_params({ 'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3' }, ['key1', 'key2']) \
5456
.and_return('key3' => 'value3')
5557
}
58+
5659
it {
5760
is_expected.to run \
5861
.with_params({ 'ĸəұ1' => 'νãŀủĕ1', 'ĸəұ2' => 'νãŀủĕ2', 'ĸəұ3' => 'νãŀủĕ3' }, ['ĸəұ1', 'ĸəұ2']) \
@@ -66,12 +69,14 @@
6669
_result = subject.execute(argument1, 'two')
6770
expect(argument1).to eq(original1)
6871
end
72+
6973
it 'leaves the original string intact' do
7074
argument1 = 'onetwothree'
7175
original1 = argument1.dup
7276
_result = subject.execute(argument1, 'two')
7377
expect(argument1).to eq(original1)
7478
end
79+
7580
it 'leaves the original hash intact' do
7681
argument1 = { 'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3' }
7782
original1 = argument1.dup

spec/functions/delete_undef_values_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
pending("review behaviour when being passed undef as #{undef_value.inspect}") if undef_value == :undef && is_puppet_6
4444
end
4545
it { is_expected.to run.with_params('key' => undef_value).and_return({}) }
46+
4647
it {
4748
is_expected.to run \
4849
.with_params('key1' => 'value1', 'undef_key' => undef_value, 'key2' => 'value2') \

spec/functions/delete_values_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
99
it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
1010
it { is_expected.to run.with_params('one', 'two', 'three').and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
11+
1112
describe 'when the first argument is not a hash' do
1213
it { is_expected.to run.with_params(1, 'two').and_raise_error(TypeError, %r{First argument must be a Hash}) }
1314
it { is_expected.to run.with_params('one', 'two').and_raise_error(TypeError, %r{First argument must be a Hash}) }
@@ -16,21 +17,25 @@
1617

1718
describe 'when deleting from a hash' do
1819
it { is_expected.to run.with_params({}, 'value').and_return({}) }
20+
1921
it {
2022
is_expected.to run \
2123
.with_params({ 'key1' => 'value1' }, 'non-existing value') \
2224
.and_return('key1' => 'value1')
2325
}
26+
2427
it {
2528
is_expected.to run \
2629
.with_params({ 'ҝếỵ1 ' => 'νâĺūẹ1', 'ҝếỵ2' => 'value to delete' }, 'value to delete') \
2730
.and_return('ҝếỵ1 ' => 'νâĺūẹ1')
2831
}
32+
2933
it {
3034
is_expected.to run \
3135
.with_params({ 'key1' => 'value1', 'key2' => 'νǎŀữ℮ ťớ đêłểťė' }, 'νǎŀữ℮ ťớ đêłểťė') \
3236
.and_return('key1' => 'value1')
3337
}
38+
3439
it {
3540
is_expected.to run \
3641
.with_params({ 'key1' => 'value1', 'key2' => 'value to delete', 'key3' => 'value to delete' }, 'value to delete') \

spec/functions/dos2unix_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,23 @@
55
describe 'dos2unix' do
66
context 'when checking parameter validity' do
77
it { is_expected.not_to eq(nil) }
8+
89
it do
910
is_expected.to run.with_params.and_raise_error(ArgumentError, %r{Wrong number of arguments})
1011
end
12+
1113
it do
1214
is_expected.to run.with_params('one', 'two').and_raise_error(ArgumentError, %r{Wrong number of arguments})
1315
end
16+
1417
it do
1518
is_expected.to run.with_params([]).and_raise_error(Puppet::ParseError, %r{Requires string as argument})
1619
end
20+
1721
it do
1822
is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, %r{Requires string as argument})
1923
end
24+
2025
it do
2126
is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, %r{Requires string as argument})
2227
end

spec/functions/end_with_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
it { is_expected.to run.with_params('foobar', 'bar').and_return(true) }
88
it { is_expected.to run.with_params('foobar', 'foo').and_return(false) }
99
it { is_expected.to run.with_params('foobar', ['foo', 'baz']).and_return(false) }
10+
1011
it do
1112
is_expected.to run.with_params('foobar', '').and_raise_error(
1213
ArgumentError, %r{'stdlib::end_with' parameter 'suffixes' expects a value of type String\[1\] or Array\[String\[1\], 1\]}

spec/functions/ensure_resource_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
it { is_expected.not_to eq(nil) }
77
it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{Must specify a type}) }
88
it { is_expected.to run.with_params('type').and_raise_error(ArgumentError, %r{Must specify a title}) }
9+
910
if Puppet::Util::Package.versioncmp(Puppet.version, '4.6.0') >= 0
1011
it { is_expected.to run.with_params('type', 'title', {}, 'extras').and_raise_error(ArgumentError) }
1112
else

spec/functions/grep_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
66
it { is_expected.not_to eq(nil) }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
88
it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
9+
910
it {
1011
pending('grep does not actually check this, and raises NoMethodError instead')
1112
is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, %r{first argument not an array})
1213
}
14+
1315
it {
1416
pending('grep does not actually check this, and raises NoMethodError instead')
1517
is_expected.to run.with_params(1, 'two').and_raise_error(Puppet::ParseError, %r{first argument not an array})
1618
}
19+
1720
it { is_expected.to run.with_params('one', 'two', 'three').and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
1821
it { is_expected.to run.with_params([], 'two').and_return([]) }
1922
it { is_expected.to run.with_params(['one', 'two', 'three'], 'two').and_return(['two']) }

spec/functions/member_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
it { is_expected.not_to eq(nil) }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
88
it { is_expected.to run.with_params([]).and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
9+
910
it {
1011
pending('Current implementation ignores parameters after the first.')
1112
is_expected.to run.with_params([], [], []).and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i)
1213
}
14+
1315
it { is_expected.to run.with_params([], '').and_return(false) }
1416
it { is_expected.to run.with_params([], ['']).and_return(false) }
1517
it { is_expected.to run.with_params([''], '').and_return(true) }

spec/functions/merge_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
describe 'merge' do
66
it { is_expected.not_to eq(nil) }
7+
78
it {
89
is_expected.to run \
910
.with_params({}, 'two') \
@@ -12,11 +13,13 @@
1213
Regexp.new(Regexp.escape("rejected: parameter 'args' expects a value of type Undef, Hash[Scalar, Any], or String[0, 0], got String")),
1314
)
1415
}
16+
1517
it {
1618
is_expected.to run \
1719
.with_params({}, 1) \
1820
.and_raise_error(ArgumentError, %r{parameter 'args' expects a value of type Undef, Hash, or String, got Integer})
1921
}
22+
2023
it {
2124
is_expected.to run \
2225
.with_params({ 'one' => 1, 'three' => { 'four' => 4 } }, 'two' => 'dos', 'three' => { 'five' => 5 }) \
@@ -35,43 +38,50 @@
3538
it { is_expected.to run.with_params({ 'key' => 'value' }, {}).and_return('key' => 'value') }
3639
it { is_expected.to run.with_params({}, 'key' => 'value').and_return('key' => 'value') }
3740
it { is_expected.to run.with_params({ 'key' => 'value1' }, 'key' => 'value2').and_return('key' => 'value2') }
41+
3842
it {
3943
is_expected.to run \
4044
.with_params({ 'key1' => 'value1' }, { 'key2' => 'value2' }, 'key3' => 'value3') \
4145
.and_return('key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3')
4246
}
47+
4348
describe 'should accept iterable and merge produced hashes' do
4449
it {
4550
is_expected.to run \
4651
.with_params([1, 2, 3]) \
4752
.with_lambda { |_hsh, val| { val => val } } \
4853
.and_return(1 => 1, 2 => 2, 3 => 3)
4954
}
55+
5056
it {
5157
is_expected.to run \
5258
.with_params([1, 2, 3]) \
5359
.with_lambda { |_hsh, val| { val => val } unless val == 2 } \
5460
.and_return(1 => 1, 3 => 3)
5561
}
62+
5663
it {
5764
is_expected.to run \
5865
.with_params([1, 2, 3]) \
5966
# rubocop:disable Style/Semicolon
6067
.with_lambda { |_hsh, val| raise StopIteration if val == 3; { val => val } } \
6168
.and_return(1 => 1, 2 => 2)
6269
}
70+
6371
it {
6472
is_expected.to run \
6573
.with_params(['a', 'b', 'b', 'c', 'b']) \
6674
.with_lambda { |hsh, val| { val => (hsh[val] || 0) + 1 } } \
6775
.and_return('a' => 1, 'b' => 3, 'c' => 1)
6876
}
77+
6978
it {
7079
is_expected.to run \
7180
.with_params(['a', 'b', 'c']) \
7281
.with_lambda { |_hsh, idx, val| { idx => val } } \
7382
.and_return(0 => 'a', 1 => 'b', 2 => 'c')
7483
}
84+
7585
it {
7686
is_expected.to run \
7787
.with_params('a' => 'A', 'b' => 'B', 'c' => 'C') \

spec/functions/powershell_escape_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
describe 'escaping' do
1919
it { is_expected.to run.with_params('foo').and_return('foo') }
2020
it { is_expected.to run.with_params('foo bar').and_return('foo` bar') }
21+
2122
it {
2223
is_expected.to run.with_params('~`!@#$%^&*()_-=[]\{}|;\':",./<>?')
2324
.and_return('~``!@#`$%^&*()_-=[]\{}`|;`\':\\`",./<>?')

spec/functions/prefix_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
describe 'prefix' do
66
it { is_expected.not_to eq(nil) }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
8+
89
it {
910
pending('Current implementation ignores parameters after the second.')
1011
is_expected.to run.with_params([], 'a', '').and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i)
1112
}
13+
1214
it { is_expected.to run.with_params('', '').and_raise_error(Puppet::ParseError, %r{expected first argument to be an Array or a Hash}) }
1315
it { is_expected.to run.with_params([], 2).and_raise_error(Puppet::ParseError, %r{expected second argument to be a String}) }
1416
it { is_expected.to run.with_params([]).and_return([]) }
@@ -23,6 +25,7 @@
2325
it { is_expected.to run.with_params({}, '').and_return({}) }
2426
it { is_expected.to run.with_params({ 'key' => 'value' }, '').and_return('key' => 'value') }
2527
it { is_expected.to run.with_params({ 'key' => 'value' }, 'pre').and_return('prekey' => 'value') }
28+
2629
it {
2730
is_expected.to run \
2831
.with_params({ 'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3' }, 'pre') \

0 commit comments

Comments
 (0)