Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
rubocop-rspec config
require:
- rubocop-rspec
# Disable all cops by default,
# only enable those defined explcitly in this configuration file
RSpec:
Enabled: false
RSpec/Focus:
Enabled: true
RSpec/EmptyExampleGroup:
Enabled: true
RSpec/EmptyLineAfterExampleGroup:
Enabled: true
RSpec/EmptyLineAfterFinalLet:
Enabled: true
RSpec/EmptyLineAfterHook:
Enabled: true
RSpec/EmptyLineAfterSubject:
Enabled: true
RSpec/HookArgument:
Enabled: true
RSpec/HooksBeforeExamples:
Enabled: true
RSpec/ImplicitExpect:
Enabled: true
RSpec/IteratedExpectation:
Enabled: true
RSpec/LetBeforeExamples:
Enabled: true
RSpec/MissingExampleGroupArgument:
Enabled: true
RSpec/ReceiveCounts:
Enabled: true
RSpec/Capybara/CurrentPathExpectation:
Enabled: true
RSpec/FactoryBot/AttributeDefinedStatically:
Enabled: true
RSpec/FactoryBot/CreateList:
Enabled: true
@diesl
Copy link

diesl commented Jan 31, 2022

Hi @palkan, I followed your excellent article RuboCoping with legacy. During setup, I got the following warnings:

.rubocop_rspec.yml: Capybara/CurrentPathExpectation has the wrong namespace - should be RSpec/Capybara
.rubocop_rspec.yml: FactoryBot/AttributeDefinedStatically has the wrong namespace - should be RSpec/FactoryBot
.rubocop_rspec.yml: FactoryBot/CreateList has the wrong namespace - should be RSpec/FactoryBot

I did some investigation and indeed the namespaces have been changed in this commit: rubocop/rubocop-rspec@ccf11f7

It would be nice if you could fix it! Thanks!

@palkan
Copy link
Author

palkan commented Feb 4, 2022

Thanks! That's helpful.

We plan to upgrade the article soon to keep it up-to-date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment