.rubocop_rspec.yml
---
# Last updated to 2.18.1
require:
- 'rubocop-rspec'
################################################################################
# CAPYBARA
################################################################################
Capybara/CurrentPathExpectation:
Enabled: true
Capybara/MatchStyle:
Enabled: true
Capybara/NegationMatcher:
Enabled: true
Capybara/SpecificActions:
Enabled: true
Capybara/SpecificFinders:
Enabled: true
Capybara/SpecificMatcher:
Enabled: true
Capybara/VisibilityMatcher:
Enabled: true
################################################################################
# RSPEC
################################################################################
RSpec/AlignLeftLetBrace:
Enabled: true
RSpec/AlignRightLetBrace:
Enabled: false
RSpec/AnyInstance:
Enabled: true
RSpec/AroundBlock:
Enabled: true
RSpec/Be:
Enabled: true
RSpec/BeEq:
Enabled: true
RSpec/BeEql:
Enabled: true
RSpec/BeNil:
Enabled: true
EnforcedStyle: 'be'
RSpec/BeforeAfterAll:
Enabled: true
Exclude:
- 'spec/spec_helper.rb'
- 'spec/rails_helper.rb'
- 'spec/support/**/*.rb'
RSpec/Capybara/FeatureMethods:
Enabled: true
RSpec/ChangeByZero:
Enabled: true
NegatedMatcher: ~
RSpec/ClassCheck:
Enabled: true
RSpec/ContextMethod:
Enabled: true
RSpec/ContextWording:
Enabled: true
AllowedPatterns: []
Prefixes:
- 'administrators'
- 'and'
- 'anyone'
- 'but'
- 'or'
- 'regular users'
- 'when'
- 'with'
- 'without'
RSpec/DescribeClass:
Enabled: true
# Doesn't allow:
#
# module Foo
# describe Bar do
# end
# end
RSpec/DescribedClassModuleWrapping:
Enabled: false
RSpec/DescribeMethod:
Enabled: true
RSpec/DescribeSymbol:
Enabled: true
RSpec/DescribedClass:
Enabled: true
SkipBlocks: false
EnforcedStyle: 'explicit'
RSpec/Dialect:
Enabled: true
PreferredMethods: {}
RSpec/DuplicatedMetadata:
Enabled: true
RSpec/EmptyExampleGroup:
Enabled: false
RSpec/EmptyHook:
Enabled: true
RSpec/EmptyLineAfterExample:
Enabled: true
AllowConsecutiveOneLiners: true
RSpec/EmptyLineAfterExampleGroup:
Enabled: true
RSpec/EmptyLineAfterFinalLet:
Enabled: true
RSpec/EmptyLineAfterHook:
Enabled: true
AllowConsecutiveOneLiners: true
RSpec/EmptyLineAfterSubject:
Enabled: true
Exclude:
- '**/factories/*.rb'
RSpec/ExampleLength:
Enabled: true
CountAsOne:
- 'array'
- 'hash'
- 'heredoc'
Max: 25
RSpec/ExampleWithoutDescription:
Enabled: true
EnforcedStyle: 'single_line_only'
RSpec/ExampleWording:
Enabled: true
IgnoredWords: []
RSpec/ExcessiveDocstringSpacing:
Enabled: true
RSpec/ExpectActual:
Enabled: true
Exclude:
- 'spec/routing/**/*'
RSpec/ExpectChange:
Enabled: true
EnforcedStyle: 'method_call'
RSpec/ExpectInHook:
Enabled: true
RSpec/ExpectOutput:
Enabled: true
RSpec/FactoryBot/AttributeDefinedStatically:
Enabled: true
RSpec/FactoryBot/ConsistentParenthesesStyle:
Enabled: true
RSpec/FactoryBot/CreateList:
Enabled: true
RSpec/FactoryBot/FactoryClassName:
Enabled: true
RSpec/FactoryBot/FactoryNameStyle:
Enabled: true
RSpec/FactoryBot/SyntaxMethods:
Enabled: true
RSpec/FilePath:
Enabled: true
IgnoreMethods: false
SpecSuffixOnly: true
CustomTransform:
RuboCop: 'rubocop'
RSpec: 'rspec'
RSpec/Focus:
Enabled: true
RSpec/HookArgument:
Enabled: true
EnforcedStyle: 'each'
RSpec/HooksBeforeExamples:
Enabled: true
RSpec/IdenticalEqualityAssertion:
Enabled: true
RSpec/ImplicitBlockExpectation:
Enabled: true
RSpec/ImplicitExpect:
Enabled: true
EnforcedStyle: 'is_expected'
RSpec/ImplicitSubject:
Enabled: true
EnforcedStyle: 'single_statement_only'
RSpec/InstanceSpy:
Enabled: true
RSpec/InstanceVariable:
Enabled: true
RSpec/ItBehavesLike:
Enabled: true
EnforcedStyle: 'it_behaves_like'
RSpec/IteratedExpectation:
Enabled: true
RSpec/LeadingSubject:
Enabled: true
RSpec/LeakyConstantDeclaration:
Enabled: true
RSpec/LetBeforeExamples:
Enabled: true
RSpec/LetSetup:
Enabled: true
RSpec/MessageChain:
Enabled: true
RSpec/MessageExpectation:
Enabled: true
EnforcedStyle: 'allow'
RSpec/MessageSpies:
Enabled: true
EnforcedStyle: 'have_received'
RSpec/MissingExampleGroupArgument:
Enabled: true
RSpec/MultipleDescribes:
Enabled: true
RSpec/MultipleExpectations:
Enabled: false
Max: 5
RSpec/MultipleMemoizedHelpers:
Enabled: true
AllowSubject: false
Max: 2
RSpec/MultipleSubjects:
Enabled: true
RSpec/NamedSubject:
Enabled: true
IgnoreSharedExamples: true
EnforcedStyle: "always"
RSpec/NestedGroups:
Enabled: true
Max: 2
AllowedGroups: []
RSpec/NoExpectationExample:
Enabled: true
AllowedPatterns: []
RSpec/NotToNot:
Enabled: true
EnforcedStyle: 'not_to'
RSpec/OverwritingSetup:
Enabled: true
RSpec/Pending:
Enabled: false
RSpec/PendingWithoutReason:
Enabled: true
RSpec/PredicateMatcher:
Enabled: true
Strict: true
EnforcedStyle: 'inflected'
AllowedExplicitMatchers: []
RSpec/Rails/AvoidSetupHook:
Enabled: true
RSpec/Rails/HaveHttpStatus:
Enabled: true
RSpec/Rails/HttpStatus:
Enabled: true
EnforcedStyle: 'numeric'
RSpec/Rails/InferredSpecType:
Enabled: true
RSpec/Rails/MinitestAssertions:
Enabled: true
RSpec/ReceiveCounts:
Enabled: true
RSpec/ReceiveNever:
Enabled: true
RSpec/RepeatedDescription:
Enabled: true
RSpec/RepeatedExample:
Enabled: true
RSpec/RepeatedExampleGroupBody:
Enabled: true
RSpec/RepeatedExampleGroupDescription:
Enabled: true
RSpec/RepeatedIncludeExample:
Enabled: true
RSpec/ReturnFromStub:
Enabled: true
EnforcedStyle: 'and_return'
RSpec/ScatteredLet:
Enabled: true
RSpec/ScatteredSetup:
Enabled: true
RSpec/SharedContext:
Enabled: true
RSpec/SharedExamples:
Enabled: true
RSpec/SingleArgumentMessageChain:
Enabled: true
RSpec/SortMetadata:
Enabled: true
RSpec/StubbedMock:
Enabled: true
RSpec/SubjectDeclaration:
Enabled: true
RSpec/SubjectStub:
Enabled: true
RSpec/UnspecifiedException:
Enabled: true
RSpec/VariableDefinition:
Enabled: true
EnforcedStyle: 'symbols'
RSpec/VariableName:
Enabled: true
EnforcedStyle: 'snake_case'
AllowedPatterns: []
RSpec/VerifiedDoubleReference:
Enabled: true
EnforcedStyle: 'string'
RSpec/VerifiedDoubles:
Enabled: true
IgnoreSymbolicNames: false
IgnoreNameless: false
RSpec/VoidExpect:
Enabled: true
RSpec/Yield:
Enabled: true