require: - rubocop-rspec RSpec/AlignLeftLetBrace: Enabled: false RSpec/AlignRightLetBrace: Enabled: false RSpec/AnyInstance: Enabled: true RSpec/AroundBlock: Enabled: true RSpec/Be: Enabled: true RSpec/BeEmpty: Enabled: true RSpec/BeEq: Enabled: true RSpec/BeEql: Enabled: true RSpec/BeNil: Enabled: true RSpec/BeforeAfterAll: Enabled: false RSpec/ChangeByZero: Enabled: true RSpec/ClassCheck: Enabled: true RSpec/ContainExactly: Enabled: true RSpec/ContextMethod: Enabled: true RSpec/ContextWording: Enabled: true Prefixes: - for - if - unless - when - while - with - without RSpec/DescribeClass: Enabled: false RSpec/DescribeMethod: Enabled: false RSpec/DescribeSymbol: Enabled: true RSpec/DescribedClass: Enabled: false RSpec/DescribedClassModuleWrapping: Enabled: false RSpec/Dialect: Enabled: false RSpec/DuplicatedMetadata: Enabled: true RSpec/EmptyExampleGroup: Enabled: true RSpec/EmptyHook: Enabled: true RSpec/EmptyLineAfterExample: Enabled: true RSpec/EmptyLineAfterExampleGroup: Enabled: true RSpec/EmptyLineAfterFinalLet: Enabled: true RSpec/EmptyLineAfterHook: Enabled: true RSpec/EmptyLineAfterSubject: Enabled: true RSpec/EmptyMetadata: Enabled: true RSpec/Eq: Enabled: true RSpec/ExampleLength: Enabled: false RSpec/ExampleWithoutDescription: Enabled: true RSpec/ExampleWording: Enabled: true RSpec/ExcessiveDocstringSpacing: Enabled: true RSpec/ExpectActual: Enabled: true RSpec/ExpectChange: Enabled: true RSpec/ExpectInHook: Enabled: true RSpec/ExpectOutput: Enabled: false RSpec/FilePath: Enabled: false RSpec/Focus: Enabled: true RSpec/HookArgument: Enabled: true RSpec/HooksBeforeExamples: Enabled: true RSpec/IdenticalEqualityAssertion: Enabled: true RSpec/ImplicitBlockExpectation: Enabled: true RSpec/ImplicitExpect: Enabled: true RSpec/ImplicitSubject: Enabled: true # Currently pending (as of 2.16) but causes multiple fails on Rater and Chopin # and possibly controversial/unpopular so keep disabled pending discussion RSpec/IndexedLet: Enabled: false RSpec/InstanceSpy: Enabled: true RSpec/InstanceVariable: Enabled: false RSpec/ItBehavesLike: Enabled: true RSpec/IteratedExpectation: Enabled: true RSpec/LeadingSubject: Enabled: true RSpec/LeakyConstantDeclaration: Enabled: true RSpec/LetBeforeExamples: Enabled: true RSpec/LetSetup: Enabled: true RSpec/MatchArray: Enabled: false RSpec/MessageChain: Enabled: true RSpec/MessageSpies: Enabled: false RSpec/MetadataStyle: Enabled: false RSpec/MissingExampleGroupArgument: Enabled: true RSpec/MultipleDescribes: Enabled: true RSpec/MultipleExpectations: Enabled: false RSpec/MultipleMemoizedHelpers: Enabled: false RSpec/MultipleSubjects: Enabled: true RSpec/NamedSubject: Enabled: true RSpec/NestedGroups: Enabled: true Max: 4 RSpec/NoExpectationExample: Enabled: true RSpec/NotToNot: Enabled: false RSpec/OverwritingSetup: Enabled: true RSpec/Pending: Enabled: false # Bug https://github.com/rubocop/rubocop-rspec/issues/1521 RSpec/PendingWithoutReason: Enabled: false RSpec/PredicateMatcher: Enabled: true RSpec/ReceiveCounts: Enabled: true RSpec/ReceiveMessages: Enabled: true RSpec/ReceiveNever: Enabled: true RSpec/RedundantAround: 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 RSpec/ScatteredLet: Enabled: true RSpec/ScatteredSetup: Enabled: false RSpec/SharedContext: Enabled: true RSpec/SharedExamples: Enabled: true RSpec/SingleArgumentMessageChain: Enabled: true RSpec/SkipBlockInsideExample: Enabled: true RSpec/SortMetadata: Enabled: true RSpec/SpecFilePathFormat: Enabled: false RSpec/SpecFilePathSuffix: Enabled: true RSpec/StubbedMock: Enabled: false RSpec/SubjectDeclaration: Enabled: true RSpec/SubjectStub: Enabled: true RSpec/UnspecifiedException: Enabled: true RSpec/VariableDefinition: Enabled: true RSpec/VerifiedDoubleReference: Enabled: true RSpec/VerifiedDoubles: Enabled: true RSpec/VoidExpect: Enabled: true RSpec/Yield: Enabled: true # Rspec/Capybara # Similar to FactoryBot (see below) there is an RSpec/Capybara department and a separate Capybara # package which is not installed in simplycop. This configuration is just for the RSpec department. # The namespacing has been changed to avoid warnings. RSpec/Capybara: Enabled: true Include: - spec/integration/*.rb Capybara/CurrentPathExpectation: Enabled: true RSpec/Capybara/FeatureMethods: 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/FactoryBot # NB: There is an RSpec/FactoryBot department and a separate FactoryBot package. The FactoryBot package is # not installed on simplycop. The configuration is just for the RSpec department, namespaced to avoid warnings. FactoryBot/AttributeDefinedStatically: Enabled: true FactoryBot/ConsistentParenthesesStyle: Enabled: true FactoryBot/CreateList: Enabled: false FactoryBot/FactoryClassName: Enabled: true FactoryBot/FactoryNameStyle: Enabled: true # Prefer explicit factorybot call FactoryBot/SyntaxMethods: Enabled: false # Previously some FactoryBot package cops were configured due to the above confusion. There is less crossover between # RSpec/FactoryBot and FactoryBot than Capybara, so it generated a number of errors when they weren't found. # This is how they were configured: # FactoryBot/AssociationStyle: # Enabled: true # FactoryBot/AttributeDefinedStatically: # Enabled: true # FactoryBot/ConsistentParenthesesStyle: # Enabled: true # FactoryBot/CreateList: # Enabled: false # FactoryBot/FactoryAssociationWithStrategy: # Enabled: true # FactoryBot/FactoryClassName: # Enabled: true # FactoryBot/FactoryNameStyle: # Enabled: true # FactoryBot/IdSequence: # Enabled: true # FactoryBot/RedundantFactoryOption: # Enabled: true # # Prefer explicit factorybot call # FactoryBot/SyntaxMethods: # Enabled: false # Rspec/Rails RSpec/Rails/AvoidSetupHook: # new in 2.4 Enabled: true RSpec/Rails/HaveHttpStatus: Enabled: true RSpec/Rails/HttpStatus: Enabled: true RSpec/Rails/InferredSpecType: Enabled: true RSpec/Rails/MinitestAssertions: Enabled: true RSpec/Rails/NegationBeValid: Enabled: true RSpec/Rails/TravelAround: Enabled: true