Skip to content

Commit

Permalink
Move basic RSpec rubocop rules to basic cops
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
javierm committed Sep 10, 2019
1 parent 59e107e commit 2243809
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 30 deletions.
30 changes: 0 additions & 30 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,9 @@ RSpec/AlignRightLetBrace:
RSpec/AnyInstance:
Enabled: false

RSpec/AroundBlock:
Enabled: true

RSpec/BeEql:
Enabled: true

RSpec/BeforeAfterAll:
Enabled: true

Capybara/FeatureMethods:
Enabled: false

Expand All @@ -192,12 +186,6 @@ RSpec/DescribeMethod:
RSpec/DescribeSymbol:
Enabled: true

RSpec/EmptyExampleGroup:
Enabled: true

RSpec/EmptyLineAfterSubject:
Enabled: true

RSpec/ExampleLength:
Enabled: false

Expand All @@ -213,9 +201,6 @@ RSpec/ExpectOutput:
RSpec/FilePath:
Enabled: true

RSpec/Focus:
Enabled: true

RSpec/ImplicitExpect:
Enabled: true
EnforcedStyle: should
Expand All @@ -238,9 +223,6 @@ RSpec/IteratedExpectation:
RSpec/LeadingSubject:
Enabled: true

RSpec/LetBeforeExamples:
Enabled: true

RSpec/MessageChain:
Enabled: true

Expand All @@ -267,9 +249,6 @@ RSpec/NestedGroups:
Enabled: true
Max: 4

RSpec/OverwritingSetup:
Enabled: true

RSpec/PredicateMatcher:
Enabled: true

Expand All @@ -282,12 +261,6 @@ RSpec/RepeatedDescription:
RSpec/ReturnFromStub:
Enabled: true

RSpec/ScatteredLet:
Enabled: true

RSpec/ScatteredSetup:
Enabled: true

RSpec/SharedContext:
Enabled: true

Expand All @@ -300,9 +273,6 @@ RSpec/SubjectStub:
RSpec/VerifiedDoubles:
Enabled: true

RSpec/VoidExpect:
Enabled: true

Security/Eval:
Enabled: true

Expand Down
34 changes: 34 additions & 0 deletions .rubocop_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,55 @@ Rails/UnknownEnv:
Rails/Validation:
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:
Enabled: true

RSpec/Focus:
Enabled: true

RSpec/HookArgument:
Enabled: true

RSpec/LetBeforeExamples:
Enabled: true

RSpec/LetSetup:
Enabled: true

RSpec/NotToNot:
Enabled: true

RSpec/OverwritingSetup:
Enabled: true

RSpec/RepeatedExample:
Enabled: true

RSpec/ScatteredLet:
Enabled: true

RSpec/ScatteredSetup:
Enabled: true

RSpec/VoidExpect:
Enabled: true

Style/PercentLiteralDelimiters:
Enabled: true

Expand Down

0 comments on commit 2243809

Please sign in to comment.