From 132f5e1a368d3d6206ef8b6f9ef7a3d234402158 Mon Sep 17 00:00:00 2001 From: Odin H B Date: Tue, 15 Jun 2021 18:28:30 +0200 Subject: [PATCH] Fix a few rubocop violations come across these while reading code/specs --- spec/rspec/core_spec.rb | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/spec/rspec/core_spec.rb b/spec/rspec/core_spec.rb index 085acbbbab..dbb5775c5a 100644 --- a/spec/rspec/core_spec.rb +++ b/spec/rspec/core_spec.rb @@ -98,7 +98,7 @@ describe ".configure" do it "yields the current configuration" do RSpec.configure do |config| - expect(config).to equal(RSpec::configuration) + expect(config).to equal(RSpec.configuration) end end end @@ -141,11 +141,11 @@ end it 'removes the previously assigned example group constants' do - RSpec.describe "group" + RSpec.describe "group" - expect { - RSpec.world.reset - }.to change(RSpec::ExampleGroups, :constants).to([]) + expect { + RSpec.world.reset + }.to change(RSpec::ExampleGroups, :constants).to([]) end end @@ -256,7 +256,7 @@ def reporter RSpec.clear_examples - RSpec.configuration.deprecation_stream = StringIO.new(deprecations = "".dup) + RSpec.configuration.deprecation_stream = StringIO.new(deprecations = +"") RSpec.describe do example { RSpec.deprecate("second deprecation") } @@ -270,7 +270,7 @@ def reporter end it 'does not clear shared examples' do - RSpec.shared_examples_for("shared") { } + RSpec.shared_examples_for("shared") {} RSpec.clear_examples @@ -281,8 +281,8 @@ def reporter it 'uses only one thread local variable', :run_last do # Trigger features that use thread locals... - aggregate_failures { } - RSpec.shared_examples_for("something") { } + aggregate_failures {} + RSpec.shared_examples_for("something") {} expect(Thread.current.keys.map(&:to_s).grep(/rspec/i).count).to eq(1) end @@ -325,4 +325,3 @@ def reporter expect(status.exitstatus).to eq(0) end end -