From c1ae856564d024e44cd25b6472f6d767b8a1d848 Mon Sep 17 00:00:00 2001 From: Paula Muir Date: Fri, 5 Apr 2024 08:38:12 +0100 Subject: [PATCH] (maint) Address rubocop Prior to this commit, the nightlies were failing due to a change in Rubocop. This PR addresses the failures. --- .../yard/handlers/puppet/class_handler_spec.rb | 6 +++--- .../yard/handlers/puppet/data_type_alias_handler_spec.rb | 2 +- .../yard/handlers/puppet/defined_type_handler_spec.rb | 6 +++--- .../yard/handlers/puppet/function_handler_spec.rb | 8 ++++---- .../yard/handlers/ruby/data_type_handler_spec.rb | 2 +- .../yard/handlers/ruby/function_handler_spec.rb | 2 +- .../yard/handlers/ruby/provider_handler_spec.rb | 2 +- .../yard/handlers/ruby/rsapi_handler_spec.rb | 2 +- .../yard/handlers/ruby/type_handler_spec.rb | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb b/spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb index 8a50ef65..24f88be6 100644 --- a/spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb +++ b/spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb @@ -124,7 +124,7 @@ class foo(Integer $param1, $param2, String $param3 = hi) inherits foo::bar { SOURCE it 'respects the type that was documented' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) tags = spec_subject.first.tags(:param) expect(tags.size).to eq(3) @@ -168,7 +168,7 @@ class foo(Integer $param1, $param2, String $param3 = hi) inherits foo::bar { SOURCE it 'respects the type that was documented' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) tags = spec_subject.first.tags(:param) expect(tags.size).to eq(3) @@ -189,7 +189,7 @@ class foo() { SOURCE it 'parses the summary' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) summary = spec_subject.first.tags(:summary) expect(summary.first.text).to eq('A short summary.') diff --git a/spec/unit/puppet-strings/yard/handlers/puppet/data_type_alias_handler_spec.rb b/spec/unit/puppet-strings/yard/handlers/puppet/data_type_alias_handler_spec.rb index b83e8d16..6b188aea 100644 --- a/spec/unit/puppet-strings/yard/handlers/puppet/data_type_alias_handler_spec.rb +++ b/spec/unit/puppet-strings/yard/handlers/puppet/data_type_alias_handler_spec.rb @@ -43,7 +43,7 @@ SOURCE it 'parses the summary' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) summary = spec_subject.first.tags(:summary) expect(summary.first.text).to eq('A short summary.') diff --git a/spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb b/spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb index 82f0c13e..6f1df056 100644 --- a/spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb +++ b/spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb @@ -132,7 +132,7 @@ SOURCE it 'respects the type that was documented' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) tags = spec_subject.first.tags(:param) expect(tags.size).to eq(3) @@ -174,7 +174,7 @@ SOURCE it 'respects the type that was documented' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) tags = spec_subject.first.tags(:param) expect(tags.size).to eq(3) @@ -198,7 +198,7 @@ SOURCE it 'parses the summary' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) summary = spec_subject.first.tags(:summary) expect(summary.first.text).to eq('A short summary.') diff --git a/spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb b/spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb index 1297993b..a0dde5c2 100644 --- a/spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb +++ b/spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb @@ -129,7 +129,7 @@ SOURCE it 'respects the type that was documented' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) tags = spec_subject.first.tags(:param) expect(tags.size).to eq(3) @@ -171,7 +171,7 @@ SOURCE it 'respects the type that was documented' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) tags = spec_subject.first.tags(:param) expect(tags.size).to eq(3) @@ -262,7 +262,7 @@ SOURCE it 'gets the return type from the function definition' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) object = spec_subject.first expect(object).to be_a(PuppetStrings::Yard::CodeObjects::Function) @@ -307,7 +307,7 @@ SOURCE it 'parses the summary' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) summary = spec_subject.first.tags(:summary) expect(summary.first.text).to eq('A short summary.') diff --git a/spec/unit/puppet-strings/yard/handlers/ruby/data_type_handler_spec.rb b/spec/unit/puppet-strings/yard/handlers/ruby/data_type_handler_spec.rb index 6462511f..474eca3c 100644 --- a/spec/unit/puppet-strings/yard/handlers/ruby/data_type_handler_spec.rb +++ b/spec/unit/puppet-strings/yard/handlers/ruby/data_type_handler_spec.rb @@ -569,7 +569,7 @@ def suppress_yard_logging SOURCE it 'parses the summary' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) summary = spec_subject.first.tags(:summary) expect(summary.first.text).to eq('A short summary.') diff --git a/spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb b/spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb index f08659c0..0412627b 100644 --- a/spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb +++ b/spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb @@ -734,7 +734,7 @@ def other(b) SOURCE it 'parses the summary' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) summary = spec_subject.first.tags(:summary) expect(summary.first.text).to eq('A short summary.') diff --git a/spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb b/spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb index 01470dd9..1078db7a 100644 --- a/spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb +++ b/spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb @@ -130,7 +130,7 @@ SOURCE it 'parses the summary' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) summary = spec_subject.first.tags(:summary) expect(summary.first.text).to eq('A short summary.') diff --git a/spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb b/spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb index 3a14fa4d..2d59a8bc 100644 --- a/spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb +++ b/spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb @@ -187,7 +187,7 @@ SOURCE it 'parses the summary' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) summary = spec_subject.first.tags(:summary) expect(summary.first.text).to eq('A short summary.') diff --git a/spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb b/spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb index 8e226a0c..c56f4428 100644 --- a/spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb +++ b/spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb @@ -298,7 +298,7 @@ SOURCE it 'parses the summary' do - expect { spec_subject }.to output('').to_stdout_from_any_process + expect { spec_subject }.not_to output.to_stdout_from_any_process expect(spec_subject.size).to eq(1) summary = spec_subject.first.tags(:summary) expect(summary.first.text).to eq('A short summary.')