Move basic RSpec rubocop rules to basic cops

These are rules we were already applying.

We've excluded the `factories` folder for some rules because there's a
factory defining a `context` attribute, which rubocop thought was the
`context` RSpec keyword.
This commit is contained in:
Javi Martín
2019-06-24 15:22:35 +02:00
parent 59e107e565
commit 2243809d2e
2 changed files with 34 additions and 30 deletions

View File

@@ -168,15 +168,9 @@ RSpec/AlignRightLetBrace:
RSpec/AnyInstance: RSpec/AnyInstance:
Enabled: false Enabled: false
RSpec/AroundBlock:
Enabled: true
RSpec/BeEql: RSpec/BeEql:
Enabled: true Enabled: true
RSpec/BeforeAfterAll:
Enabled: true
Capybara/FeatureMethods: Capybara/FeatureMethods:
Enabled: false Enabled: false
@@ -192,12 +186,6 @@ RSpec/DescribeMethod:
RSpec/DescribeSymbol: RSpec/DescribeSymbol:
Enabled: true Enabled: true
RSpec/EmptyExampleGroup:
Enabled: true
RSpec/EmptyLineAfterSubject:
Enabled: true
RSpec/ExampleLength: RSpec/ExampleLength:
Enabled: false Enabled: false
@@ -213,9 +201,6 @@ RSpec/ExpectOutput:
RSpec/FilePath: RSpec/FilePath:
Enabled: true Enabled: true
RSpec/Focus:
Enabled: true
RSpec/ImplicitExpect: RSpec/ImplicitExpect:
Enabled: true Enabled: true
EnforcedStyle: should EnforcedStyle: should
@@ -238,9 +223,6 @@ RSpec/IteratedExpectation:
RSpec/LeadingSubject: RSpec/LeadingSubject:
Enabled: true Enabled: true
RSpec/LetBeforeExamples:
Enabled: true
RSpec/MessageChain: RSpec/MessageChain:
Enabled: true Enabled: true
@@ -267,9 +249,6 @@ RSpec/NestedGroups:
Enabled: true Enabled: true
Max: 4 Max: 4
RSpec/OverwritingSetup:
Enabled: true
RSpec/PredicateMatcher: RSpec/PredicateMatcher:
Enabled: true Enabled: true
@@ -282,12 +261,6 @@ RSpec/RepeatedDescription:
RSpec/ReturnFromStub: RSpec/ReturnFromStub:
Enabled: true Enabled: true
RSpec/ScatteredLet:
Enabled: true
RSpec/ScatteredSetup:
Enabled: true
RSpec/SharedContext: RSpec/SharedContext:
Enabled: true Enabled: true
@@ -300,9 +273,6 @@ RSpec/SubjectStub:
RSpec/VerifiedDoubles: RSpec/VerifiedDoubles:
Enabled: true Enabled: true
RSpec/VoidExpect:
Enabled: true
Security/Eval: Security/Eval:
Enabled: true Enabled: true

View File

@@ -169,21 +169,55 @@ Rails/UnknownEnv:
Rails/Validation: Rails/Validation:
Enabled: true Enabled: true
RSpec/AroundBlock:
Enabled: true
RSpec/BeforeAfterAll:
Enabled: true
RSpec/EmptyExampleGroup:
Enabled: true
Exclude:
- spec/factories/**/*
RSpec/EmptyLineAfterExampleGroup:
Enabled: true
Exclude:
- spec/factories/**/*
RSpec/ExampleWording: RSpec/ExampleWording:
Enabled: true Enabled: true
RSpec/Focus:
Enabled: true
RSpec/HookArgument: RSpec/HookArgument:
Enabled: true Enabled: true
RSpec/LetBeforeExamples:
Enabled: true
RSpec/LetSetup: RSpec/LetSetup:
Enabled: true Enabled: true
RSpec/NotToNot: RSpec/NotToNot:
Enabled: true Enabled: true
RSpec/OverwritingSetup:
Enabled: true
RSpec/RepeatedExample: RSpec/RepeatedExample:
Enabled: true Enabled: true
RSpec/ScatteredLet:
Enabled: true
RSpec/ScatteredSetup:
Enabled: true
RSpec/VoidExpect:
Enabled: true
Style/PercentLiteralDelimiters: Style/PercentLiteralDelimiters:
Enabled: true Enabled: true