---

# Last updated to 2.1.0

require:
  - 'rubocop-rspec'

################################################################################
#                                  RSPEC
################################################################################

RSpec/AlignLeftLetBrace:
  Enabled:                        true

RSpec/AlignRightLetBrace:
  Enabled:                        false

RSpec/AnyInstance:
  Enabled:                        true

RSpec/AroundBlock:
  Enabled:                        true

RSpec/Be:
  Enabled:                        true

RSpec/BeEql:
  Enabled:                        true

RSpec/BeforeAfterAll:
  Enabled:                        true
  Exclude:
    - 'spec/spec_helper.rb'
    - 'spec/rails_helper.rb'
    - 'spec/support/**/*.rb'

RSpec/Capybara/CurrentPathExpectation:
  Enabled:                        true

RSpec/Capybara/FeatureMethods:
  Enabled:                        true

RSpec/Capybara/VisibilityMatcher:
  Enabled:                        true

RSpec/ContextMethod:
  Enabled:                        true

RSpec/ContextWording:
  Enabled:                        true
  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/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

RSpec/EmptyLineAfterSubject:
  Enabled:                        true
  Exclude:
    - '**/factories/*.rb'

RSpec/ExampleLength:
  Enabled:                        false
  Max:                            50

RSpec/ExampleWithoutDescription:
  Enabled:                        true
  EnforcedStyle:                  'single_line_only'

RSpec/ExampleWording:
  Enabled:                        true
  IgnoredWords:                   []

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/CreateList:
  Enabled:                        true

RSpec/FactoryBot/FactoryClassName:
  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/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

RSpec/NestedGroups:
  Enabled:                        true
  Max:                            2

RSpec/NotToNot:
  Enabled:                        true
  EnforcedStyle:                  'not_to'

RSpec/OverwritingSetup:
  Enabled:                        true

RSpec/Pending:
  Enabled:                        false

RSpec/PredicateMatcher:
  Enabled:                        true
  Strict:                         true
  EnforcedStyle:                  'inflected'
  AllowedExplicitMatchers:        []

RSpec/Rails/HttpStatus:
  Enabled:                        true
  EnforcedStyle:                  'numeric'

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/StubbedMock:
  Enabled:                        true

RSpec/SubjectStub:
  Enabled:                        true

RSpec/UnspecifiedException:
  Enabled:                        true

RSpec/VariableDefinition:
  Enabled:                        true
  EnforcedStyle:                  'symbols'

RSpec/VariableName:
  Enabled:                        true
  EnforcedStyle:                  'snake_case'
  IgnoredPatterns:                []

RSpec/VerifiedDoubles:
  Enabled:                        true
  IgnoreSymbolicNames:            false
  IgnoreNameless:                 false

RSpec/VoidExpect:
  Enabled:                        true

RSpec/Yield:
  Enabled:                        true
