Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 132f5e1

Browse files
committed
Fix a few rubocop violations
come across these while reading code/specs
1 parent 247d0a7 commit 132f5e1

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

spec/rspec/core_spec.rb

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
describe ".configure" do
9999
it "yields the current configuration" do
100100
RSpec.configure do |config|
101-
expect(config).to equal(RSpec::configuration)
101+
expect(config).to equal(RSpec.configuration)
102102
end
103103
end
104104
end
@@ -141,11 +141,11 @@
141141
end
142142

143143
it 'removes the previously assigned example group constants' do
144-
RSpec.describe "group"
144+
RSpec.describe "group"
145145

146-
expect {
147-
RSpec.world.reset
148-
}.to change(RSpec::ExampleGroups, :constants).to([])
146+
expect {
147+
RSpec.world.reset
148+
}.to change(RSpec::ExampleGroups, :constants).to([])
149149
end
150150
end
151151

@@ -256,7 +256,7 @@ def reporter
256256

257257
RSpec.clear_examples
258258

259-
RSpec.configuration.deprecation_stream = StringIO.new(deprecations = "".dup)
259+
RSpec.configuration.deprecation_stream = StringIO.new(deprecations = +"")
260260

261261
RSpec.describe do
262262
example { RSpec.deprecate("second deprecation") }
@@ -270,7 +270,7 @@ def reporter
270270
end
271271

272272
it 'does not clear shared examples' do
273-
RSpec.shared_examples_for("shared") { }
273+
RSpec.shared_examples_for("shared") {}
274274

275275
RSpec.clear_examples
276276

@@ -281,8 +281,8 @@ def reporter
281281

282282
it 'uses only one thread local variable', :run_last do
283283
# Trigger features that use thread locals...
284-
aggregate_failures { }
285-
RSpec.shared_examples_for("something") { }
284+
aggregate_failures {}
285+
RSpec.shared_examples_for("something") {}
286286

287287
expect(Thread.current.keys.map(&:to_s).grep(/rspec/i).count).to eq(1)
288288
end
@@ -325,4 +325,3 @@ def reporter
325325
expect(status.exitstatus).to eq(0)
326326
end
327327
end
328-

0 commit comments

Comments
 (0)