Skip to content

Commit 084f7cf

Browse files
committed
Revert "(CONT-785) Rubocop Manual Fix 5 - RSpec/NoExpectationExample"
This reverts commit f4f53c3.
1 parent 07695c2 commit 084f7cf

File tree

9 files changed

+34
-20
lines changed

9 files changed

+34
-20
lines changed

.rubocop_todo.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,20 @@ RSpec/ExampleLength:
6161
RSpec/NestedGroups:
6262
Max: 4
6363

64+
# Offense count: 18
65+
# Configuration parameters: AllowedPatterns.
66+
# AllowedPatterns: ^expect_, ^assert_
67+
RSpec/NoExpectationExample:
68+
Exclude:
69+
- 'spec/acceptance/chain_key_spec.rb'
70+
- 'spec/acceptance/content_spec.rb'
71+
- 'spec/acceptance/destkeypass_spec.rb'
72+
- 'spec/acceptance/keystore_spec.rb'
73+
- 'spec/acceptance/pkcs12_spec.rb'
74+
- 'spec/acceptance/private_key_spec.rb'
75+
- 'spec/acceptance/truststore_spec.rb'
76+
- 'spec/unit/puppet/type/java_ks_spec.rb'
77+
6478
# Offense count: 3
6579
# This cop supports unsafe autocorrection (--autocorrect-all).
6680
# Configuration parameters: .

spec/acceptance/chain_key_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
describe 'managing combined and seperate java chain keys' do
88
include_context 'with common variables'
99

10-
it 'verifies keytool is setup', unless: os[:family] == 'windows' do # rubocop:disable RSpec/NoExpectationExample
10+
it 'verifies keytool is setup', unless: os[:family] == 'windows' do
1111
i = 0
1212
loop do
1313
keytool_status = run_shell('keytool')
@@ -43,7 +43,7 @@
4343
}
4444
MANIFEST
4545

46-
expect { idempotent_apply(pp) }.not_to raise_error
46+
idempotent_apply(pp)
4747
end
4848

4949
expectations_combined = [
@@ -94,7 +94,7 @@
9494
}
9595
MANIFEST
9696

97-
expect { idempotent_apply(pp) }.not_to raise_error
97+
idempotent_apply(pp)
9898

9999
expectations_combined = [
100100
%r{Alias name: combined\.example\.com},
@@ -146,7 +146,7 @@
146146

147147
# in noop mode, when the dependent certificate files are not present in the system,
148148
# java_ks will not invoke openssl to validate their status, thus noop will succeed
149-
expect { apply_manifest(pp, noop: true) }.not_to raise_error
149+
apply_manifest(pp, noop: true)
150150
end
151151

152152
# verifies the dependent files are missing

spec/acceptance/content_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
}
2727
MANIFEST
2828
end
29-
expect { idempotent_apply(pp) }.not_to raise_error
29+
idempotent_apply(pp)
3030
end
3131

3232
expectations = [

spec/acceptance/destkeypass_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
MANIFEST
2121

22-
expect { idempotent_apply(pp) }.not_to raise_error
22+
idempotent_apply(pp)
2323
end
2424

2525
it 'can make a cert req with the right password' do

spec/acceptance/keystore_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
MANIFEST
2424

25-
expect { idempotent_apply(pp_one) }.not_to raise_error
25+
idempotent_apply(pp_one)
2626
end
2727

2828
expectations = [
@@ -56,7 +56,7 @@
5656
}
5757
MANIFEST
5858

59-
expect { idempotent_apply(pp_two) }.not_to raise_error
59+
idempotent_apply(pp_two)
6060
end
6161

6262
it 'recreates a keystore if password fails' do
@@ -73,7 +73,7 @@
7373
}
7474
MANIFEST
7575

76-
expect { idempotent_apply(pp_three) }.not_to raise_error
76+
idempotent_apply(pp_three)
7777
end
7878

7979
it 'verifies the keystore again' do
@@ -101,7 +101,7 @@
101101
}
102102
MANIFEST
103103

104-
expect { idempotent_apply(pp) }.not_to raise_error
104+
idempotent_apply(pp)
105105
end
106106

107107
expectations = [
@@ -136,7 +136,7 @@
136136
}
137137
MANIFEST
138138

139-
expect { idempotent_apply(pp_one) }.not_to raise_error
139+
idempotent_apply(pp_one)
140140
end
141141

142142
it 'adds a certificate and key' do
@@ -152,7 +152,7 @@
152152
}
153153
MANIFEST
154154

155-
expect { idempotent_apply(pp_two) }.not_to raise_error
155+
idempotent_apply(pp_two)
156156
end
157157

158158
expectations = [

spec/acceptance/pkcs12_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
MANIFEST
2121

22-
expect { idempotent_apply(pp) }.not_to raise_error
22+
idempotent_apply(pp)
2323
end
2424

2525
expectations = [
@@ -48,7 +48,7 @@
4848
}
4949
MANIFEST
5050

51-
expect { idempotent_apply(pp) }.not_to raise_error
51+
idempotent_apply(pp)
5252

5353
expectations = if os[:family] == 'windows' || (os[:family] == 'ubuntu' && ['20.04', '22.04'].include?(os[:release])) ||
5454
(os[:family] == 'debian' && os[:release] =~ %r{^11})
@@ -90,7 +90,7 @@
9090
}
9191
MANIFEST
9292

93-
expect { idempotent_apply(pp) }.not_to raise_error
93+
idempotent_apply(pp)
9494
end
9595

9696
expectations = [
@@ -130,7 +130,7 @@
130130
}
131131
MANIFEST
132132

133-
expect { idempotent_apply(pp) }.not_to raise_error
133+
idempotent_apply(pp)
134134
end
135135

136136
expectations = [

spec/acceptance/private_key_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818
MANIFEST
1919

20-
expect { idempotent_apply(pp) }.not_to raise_error
20+
idempotent_apply(pp)
2121
end
2222

2323
expectations = [

spec/acceptance/truststore_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
path => #{@resource_path},
2121
}
2222
MANIFEST
23-
expect { idempotent_apply(pp) }.not_to raise_error
23+
idempotent_apply(pp)
2424
end
2525

2626
expectations = [
@@ -49,7 +49,7 @@
4949
path => #{@resource_path},
5050
}
5151
MANIFEST
52-
expect { idempotent_apply(pp) }.not_to raise_error
52+
idempotent_apply(pp)
5353
end
5454

5555
it 'verifies the truststore again' do

spec/unit/puppet/type/java_ks_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
describe 'when validating attribute values' do
5555
[:present, :absent, :latest].each do |value|
56-
it "supports #{value} as a value to ensure" do # rubocop:disable RSpec/NoExpectationExample
56+
it "supports #{value} as a value to ensure" do
5757
described_class.new(jks_resource.merge(ensure: value))
5858
end
5959
end

0 commit comments

Comments
 (0)