Skip to content

Commit

Permalink
Fix a few rubocop violations
Browse files Browse the repository at this point in the history
come across these while reading code/specs
  • Loading branch information
odinhb committed Jun 18, 2021
1 parent 247d0a7 commit 132f5e1
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions spec/rspec/core_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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") }
Expand All @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -325,4 +325,3 @@ def reporter
expect(status.exitstatus).to eq(0)
end
end

0 comments on commit 132f5e1

Please sign in to comment.