Skip to content

Commit 15d201d

Browse files
Merge pull request #390 from puppetlabs/address_rubocop
(maint) Address rubocop failures in unit tests
2 parents 1db2678 + c1ae856 commit 15d201d

9 files changed

+16
-16
lines changed

spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class foo(Integer $param1, $param2, String $param3 = hi) inherits foo::bar {
124124
SOURCE
125125

126126
it 'respects the type that was documented' do
127-
expect { spec_subject }.to output('').to_stdout_from_any_process
127+
expect { spec_subject }.not_to output.to_stdout_from_any_process
128128
expect(spec_subject.size).to eq(1)
129129
tags = spec_subject.first.tags(:param)
130130
expect(tags.size).to eq(3)
@@ -168,7 +168,7 @@ class foo(Integer $param1, $param2, String $param3 = hi) inherits foo::bar {
168168
SOURCE
169169

170170
it 'respects the type that was documented' do
171-
expect { spec_subject }.to output('').to_stdout_from_any_process
171+
expect { spec_subject }.not_to output.to_stdout_from_any_process
172172
expect(spec_subject.size).to eq(1)
173173
tags = spec_subject.first.tags(:param)
174174
expect(tags.size).to eq(3)
@@ -189,7 +189,7 @@ class foo() {
189189
SOURCE
190190

191191
it 'parses the summary' do
192-
expect { spec_subject }.to output('').to_stdout_from_any_process
192+
expect { spec_subject }.not_to output.to_stdout_from_any_process
193193
expect(spec_subject.size).to eq(1)
194194
summary = spec_subject.first.tags(:summary)
195195
expect(summary.first.text).to eq('A short summary.')

spec/unit/puppet-strings/yard/handlers/puppet/data_type_alias_handler_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
SOURCE
4444

4545
it 'parses the summary' do
46-
expect { spec_subject }.to output('').to_stdout_from_any_process
46+
expect { spec_subject }.not_to output.to_stdout_from_any_process
4747
expect(spec_subject.size).to eq(1)
4848
summary = spec_subject.first.tags(:summary)
4949
expect(summary.first.text).to eq('A short summary.')

spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
SOURCE
133133

134134
it 'respects the type that was documented' do
135-
expect { spec_subject }.to output('').to_stdout_from_any_process
135+
expect { spec_subject }.not_to output.to_stdout_from_any_process
136136
expect(spec_subject.size).to eq(1)
137137
tags = spec_subject.first.tags(:param)
138138
expect(tags.size).to eq(3)
@@ -174,7 +174,7 @@
174174
SOURCE
175175

176176
it 'respects the type that was documented' do
177-
expect { spec_subject }.to output('').to_stdout_from_any_process
177+
expect { spec_subject }.not_to output.to_stdout_from_any_process
178178
expect(spec_subject.size).to eq(1)
179179
tags = spec_subject.first.tags(:param)
180180
expect(tags.size).to eq(3)
@@ -198,7 +198,7 @@
198198
SOURCE
199199

200200
it 'parses the summary' do
201-
expect { spec_subject }.to output('').to_stdout_from_any_process
201+
expect { spec_subject }.not_to output.to_stdout_from_any_process
202202
expect(spec_subject.size).to eq(1)
203203
summary = spec_subject.first.tags(:summary)
204204
expect(summary.first.text).to eq('A short summary.')

spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
SOURCE
130130

131131
it 'respects the type that was documented' do
132-
expect { spec_subject }.to output('').to_stdout_from_any_process
132+
expect { spec_subject }.not_to output.to_stdout_from_any_process
133133
expect(spec_subject.size).to eq(1)
134134
tags = spec_subject.first.tags(:param)
135135
expect(tags.size).to eq(3)
@@ -171,7 +171,7 @@
171171
SOURCE
172172

173173
it 'respects the type that was documented' do
174-
expect { spec_subject }.to output('').to_stdout_from_any_process
174+
expect { spec_subject }.not_to output.to_stdout_from_any_process
175175
expect(spec_subject.size).to eq(1)
176176
tags = spec_subject.first.tags(:param)
177177
expect(tags.size).to eq(3)
@@ -262,7 +262,7 @@
262262
SOURCE
263263

264264
it 'gets the return type from the function definition' do
265-
expect { spec_subject }.to output('').to_stdout_from_any_process
265+
expect { spec_subject }.not_to output.to_stdout_from_any_process
266266
expect(spec_subject.size).to eq(1)
267267
object = spec_subject.first
268268
expect(object).to be_a(PuppetStrings::Yard::CodeObjects::Function)
@@ -307,7 +307,7 @@
307307
SOURCE
308308

309309
it 'parses the summary' do
310-
expect { spec_subject }.to output('').to_stdout_from_any_process
310+
expect { spec_subject }.not_to output.to_stdout_from_any_process
311311
expect(spec_subject.size).to eq(1)
312312
summary = spec_subject.first.tags(:summary)
313313
expect(summary.first.text).to eq('A short summary.')

spec/unit/puppet-strings/yard/handlers/ruby/data_type_handler_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def suppress_yard_logging
569569
SOURCE
570570

571571
it 'parses the summary' do
572-
expect { spec_subject }.to output('').to_stdout_from_any_process
572+
expect { spec_subject }.not_to output.to_stdout_from_any_process
573573
expect(spec_subject.size).to eq(1)
574574
summary = spec_subject.first.tags(:summary)
575575
expect(summary.first.text).to eq('A short summary.')

spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ def other(b)
734734
SOURCE
735735

736736
it 'parses the summary' do
737-
expect { spec_subject }.to output('').to_stdout_from_any_process
737+
expect { spec_subject }.not_to output.to_stdout_from_any_process
738738
expect(spec_subject.size).to eq(1)
739739
summary = spec_subject.first.tags(:summary)
740740
expect(summary.first.text).to eq('A short summary.')

spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
SOURCE
131131

132132
it 'parses the summary' do
133-
expect { spec_subject }.to output('').to_stdout_from_any_process
133+
expect { spec_subject }.not_to output.to_stdout_from_any_process
134134
expect(spec_subject.size).to eq(1)
135135
summary = spec_subject.first.tags(:summary)
136136
expect(summary.first.text).to eq('A short summary.')

spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
SOURCE
188188

189189
it 'parses the summary' do
190-
expect { spec_subject }.to output('').to_stdout_from_any_process
190+
expect { spec_subject }.not_to output.to_stdout_from_any_process
191191
expect(spec_subject.size).to eq(1)
192192
summary = spec_subject.first.tags(:summary)
193193
expect(summary.first.text).to eq('A short summary.')

spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@
298298
SOURCE
299299

300300
it 'parses the summary' do
301-
expect { spec_subject }.to output('').to_stdout_from_any_process
301+
expect { spec_subject }.not_to output.to_stdout_from_any_process
302302
expect(spec_subject.size).to eq(1)
303303
summary = spec_subject.first.tags(:summary)
304304
expect(summary.first.text).to eq('A short summary.')

0 commit comments

Comments
 (0)