--- RSpec: Enabled: true StyleGuideBaseURL: https://rspec.rubystyle.guide DocumentationBaseURL: https://docs.rubocop.org/rubocop-rspec Include: - "**/*_spec.rb" - "**/spec/**/*" Language: inherit_mode: merge: - Expectations - Helpers - Hooks - Subjects ExampleGroups: inherit_mode: merge: - Regular - Skipped - Focused Regular: - describe - context - feature - example_group Skipped: - xdescribe - xcontext - xfeature Focused: - fdescribe - fcontext - ffeature Examples: inherit_mode: merge: - Regular - Skipped - Focused - Pending Regular: - it - specify - example - scenario - its Focused: - fit - fspecify - fexample - fscenario - focus Skipped: - xit - xspecify - xexample - xscenario - skip Pending: - pending Expectations: - are_expected - expect - expect_any_instance_of - is_expected - should - should_not - should_not_receive - should_receive Helpers: - let - let! Hooks: - prepend_before - before - append_before - around - prepend_after - after - append_after Includes: inherit_mode: merge: - Examples - Context Examples: - it_behaves_like - it_should_behave_like - include_examples Context: - include_context SharedGroups: inherit_mode: merge: - Examples - Context Examples: - shared_examples - shared_examples_for Context: - shared_context Subjects: - subject - subject! Metrics/BlockLength: inherit_mode: merge: - Exclude Exclude: - "**/*_spec.rb" - "**/spec/**/*" RSpec/AlignLeftLetBrace: Description: Checks that left braces for adjacent single line lets are aligned. Enabled: false VersionAdded: '1.16' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignLeftLetBrace RSpec/AlignRightLetBrace: Description: Checks that right braces for adjacent single line lets are aligned. Enabled: false VersionAdded: '1.16' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignRightLetBrace RSpec/AnyInstance: Description: Check that instances are not being stubbed globally. Enabled: true VersionAdded: '1.4' StyleGuide: https://rspec.rubystyle.guide/#any_instance_of Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AnyInstance RSpec/AroundBlock: Description: Checks that around blocks actually run the test. Enabled: true VersionAdded: '1.11' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AroundBlock RSpec/Be: Description: Check for expectations where `be` is used without argument. Enabled: true VersionAdded: '1.25' StyleGuide: https://rspec.rubystyle.guide/#be-matcher Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Be RSpec/BeEmpty: Description: Prefer using `be_empty` when checking for an empty array. Enabled: true AutoCorrect: contextual VersionAdded: '2.20' VersionChanged: '2.31' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEmpty RSpec/BeEq: Description: Check for expectations where `be(...)` can replace `eq(...)`. Enabled: true Safe: false VersionAdded: 2.9.0 VersionChanged: '2.16' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEq RSpec/BeEql: Description: Check for expectations where `be(...)` can replace `eql(...)`. Enabled: true Safe: false VersionAdded: '1.7' VersionChanged: '2.16' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEql RSpec/BeNil: Description: Ensures a consistent style is used when matching `nil`. Enabled: true EnforcedStyle: be_nil SupportedStyles: - be - be_nil VersionAdded: 2.9.0 VersionChanged: 2.10.0 Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeNil RSpec/BeforeAfterAll: Description: Check that before/after(:all/:context) isn't being used. Enabled: true Exclude: - "**/spec/spec_helper.rb" - "**/spec/rails_helper.rb" - "**/spec/support/**/*.rb" VersionAdded: '1.12' VersionChanged: '2.23' StyleGuide: https://rspec.rubystyle.guide/#avoid-hooks-with-context-scope Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll RSpec/ChangeByZero: Description: Prefer negated matchers over `to change.by(0)`. Enabled: true VersionAdded: '2.11' VersionChanged: '2.14' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ChangeByZero NegatedMatcher: ~ RSpec/ClassCheck: Description: Enforces consistent use of `be_a` or `be_kind_of`. StyleGuide: "#is-a-vs-kind-of" Enabled: true VersionAdded: '2.13' EnforcedStyle: be_a SupportedStyles: - be_a - be_kind_of Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ClassCheck RSpec/ContainExactly: Description: Checks where `contain_exactly` is used. Enabled: true VersionAdded: '2.19' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContainExactly RSpec/ContextMethod: Description: "`context` should not be used for specifying methods." Enabled: true VersionAdded: '1.36' StyleGuide: https://rspec.rubystyle.guide/#example-group-naming Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextMethod RSpec/ContextWording: Description: Checks that `context` docstring starts with an allowed prefix. Enabled: true Prefixes: - when - with - without AllowedPatterns: [] VersionAdded: '1.20' VersionChanged: '2.13' StyleGuide: https://rspec.rubystyle.guide/#context-descriptions Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording RSpec/DescribeClass: Description: Check that the first argument to the top-level describe is a constant. Enabled: true Exclude: - "**/spec/features/**/*" - "**/spec/requests/**/*" - "**/spec/routing/**/*" - "**/spec/system/**/*" - "**/spec/views/**/*" IgnoredMetadata: type: - channel - controller - helper - job - mailer - model - request - routing - view - feature - system - mailbox - aruba - task VersionAdded: '1.0' VersionChanged: '2.7' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass RSpec/DescribeMethod: Description: Checks that the second argument to `describe` specifies a method. Enabled: true VersionAdded: '1.0' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeMethod RSpec/DescribeSymbol: Description: Avoid describing symbols. Enabled: true VersionAdded: '1.15' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeSymbol RSpec/DescribedClass: Description: Checks that tests use `described_class`. Enabled: true SkipBlocks: false EnforcedStyle: described_class SupportedStyles: - described_class - explicit OnlyStaticConstants: true SafeAutoCorrect: false VersionAdded: '1.0' VersionChanged: '2.27' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClass RSpec/DescribedClassModuleWrapping: Description: Avoid opening modules and defining specs within them. Enabled: false VersionAdded: '1.37' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClassModuleWrapping RSpec/Dialect: Description: Enforces custom RSpec dialects. Enabled: false PreferredMethods: {} VersionAdded: '1.33' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Dialect RSpec/DuplicatedMetadata: Description: Avoid duplicated metadata. Enabled: true VersionAdded: '2.16' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DuplicatedMetadata RSpec/EmptyExampleGroup: Description: Checks if an example group does not include any tests. Enabled: true AutoCorrect: contextual SafeAutoCorrect: false VersionAdded: '1.7' VersionChanged: '2.31' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup RSpec/EmptyHook: Description: Checks for empty before and after hooks. Enabled: true AutoCorrect: contextual VersionAdded: '1.39' VersionChanged: '2.31' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyHook RSpec/EmptyLineAfterExample: Description: Checks if there is an empty line after example blocks. Enabled: true AllowConsecutiveOneLiners: true VersionAdded: '1.36' StyleGuide: https://rspec.rubystyle.guide/#empty-lines-around-examples Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExample RSpec/EmptyLineAfterExampleGroup: Description: Checks if there is an empty line after example group blocks. Enabled: true VersionAdded: '1.27' StyleGuide: https://rspec.rubystyle.guide/#empty-lines-between-describes Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExampleGroup RSpec/EmptyLineAfterFinalLet: Description: Checks if there is an empty line after the last let block. Enabled: true VersionAdded: '1.14' StyleGuide: https://rspec.rubystyle.guide/#empty-line-after-let Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterFinalLet RSpec/EmptyLineAfterHook: Description: Checks if there is an empty line after hook blocks. Enabled: true VersionAdded: '1.27' VersionChanged: '2.13' StyleGuide: https://rspec.rubystyle.guide/#empty-line-after-let Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterHook AllowConsecutiveOneLiners: true RSpec/EmptyLineAfterSubject: Description: Checks if there is an empty line after subject block. Enabled: true VersionAdded: '1.14' StyleGuide: https://rspec.rubystyle.guide/#empty-line-after-let Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterSubject RSpec/EmptyMetadata: Description: Avoid empty metadata hash. Enabled: true AutoCorrect: contextual VersionAdded: '2.24' VersionChanged: '2.31' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyMetadata RSpec/EmptyOutput: Description: Check that the `output` matcher is not called with an empty string. Enabled: true VersionAdded: '2.29' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyOutput RSpec/Eq: Description: Use `eq` instead of `be ==` to compare objects. Enabled: true VersionAdded: '2.24' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Eq RSpec/ExampleLength: Description: Checks for long examples. Enabled: true Max: 5 CountAsOne: [] VersionAdded: '1.5' VersionChanged: '2.3' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength RSpec/ExampleWithoutDescription: Description: Checks for examples without a description. Enabled: true EnforcedStyle: always_allow SupportedStyles: - always_allow - single_line_only - disallow VersionAdded: '1.22' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWithoutDescription RSpec/ExampleWording: Description: Checks for common mistakes in example descriptions. Enabled: true CustomTransform: be: is BE: IS have: has HAVE: HAS IgnoredWords: [] DisallowedExamples: - works VersionAdded: '1.0' VersionChanged: '2.13' StyleGuide: https://rspec.rubystyle.guide/#should-in-example-docstrings Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording RSpec/ExcessiveDocstringSpacing: Description: Checks for excessive whitespace in example descriptions. Enabled: true VersionAdded: '2.5' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExcessiveDocstringSpacing RSpec/ExpectActual: Description: Checks for `expect(...)` calls containing literal values. Enabled: true Exclude: - "**/spec/routing/**/*" VersionAdded: '1.7' VersionChanged: '2.23' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectActual RSpec/ExpectChange: Description: Checks for consistent style of change matcher. Enabled: true EnforcedStyle: method_call SupportedStyles: - method_call - block SafeAutoCorrect: false VersionAdded: '1.22' VersionChanged: '2.5' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectChange RSpec/ExpectInHook: Description: Do not use `expect` in hooks such as `before`. Enabled: true VersionAdded: '1.16' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectInHook RSpec/ExpectInLet: Description: Do not use `expect` in let. Enabled: true VersionAdded: '2.30' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectInLet RSpec/ExpectOutput: Description: Checks for opportunities to use `expect { ... }.to output`. Enabled: true VersionAdded: '1.10' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectOutput RSpec/Focus: Description: Checks if examples are focused. Enabled: true AutoCorrect: contextual VersionAdded: '1.5' VersionChanged: '2.31' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus RSpec/HookArgument: Description: Checks the arguments passed to `before`, `around`, and `after`. Enabled: true EnforcedStyle: implicit SupportedStyles: - implicit - each - example VersionAdded: '1.7' StyleGuide: https://rspec.rubystyle.guide/#redundant-beforeeach Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument RSpec/HooksBeforeExamples: Description: Checks for before/around/after hooks that come after an example. Enabled: true AutoCorrect: contextual VersionAdded: '1.29' VersionChanged: '2.31' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples RSpec/IdenticalEqualityAssertion: Description: Checks for equality assertions with identical expressions on both sides. Enabled: true VersionAdded: '2.4' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IdenticalEqualityAssertion RSpec/ImplicitBlockExpectation: Description: Check that implicit block expectation syntax is not used. Enabled: true VersionAdded: '1.35' StyleGuide: https://rspec.rubystyle.guide/#implicit-block-expectations Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitBlockExpectation RSpec/ImplicitExpect: Description: Check that a consistent implicit expectation style is used. Enabled: true EnforcedStyle: is_expected SupportedStyles: - is_expected - should VersionAdded: '1.8' StyleGuide: https://rspec.rubystyle.guide/#use-expect Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect RSpec/ImplicitSubject: Description: Checks for usage of implicit subject (`is_expected` / `should`). Enabled: true EnforcedStyle: single_line_only SupportedStyles: - single_line_only - single_statement_only - disallow - require_implicit VersionAdded: '1.29' VersionChanged: '2.13' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject RSpec/IndexedLet: Description: Do not set up test data using indexes (e.g., `item_1`, `item_2`). Enabled: true VersionAdded: '2.20' VersionChanged: '2.23' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IndexedLet Max: 1 AllowedIdentifiers: [] AllowedPatterns: [] RSpec/InstanceSpy: Description: Checks for `instance_double` used with `have_received`. Enabled: true VersionAdded: '1.12' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceSpy RSpec/InstanceVariable: Description: Checks for instance variable usage in specs. Enabled: true AssignmentOnly: false VersionAdded: '1.0' VersionChanged: '1.7' StyleGuide: https://rspec.rubystyle.guide/#instance-variables Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable RSpec/IsExpectedSpecify: Description: Check for `specify` with `is_expected` and one-liner expectations. Enabled: true VersionAdded: '2.27' StyleGuide: https://rspec.rubystyle.guide/#it-and-specify Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IsExpectedSpecify RSpec/ItBehavesLike: Description: Checks that only one `it_behaves_like` style is used. Enabled: true EnforcedStyle: it_behaves_like SupportedStyles: - it_behaves_like - it_should_behave_like VersionAdded: '1.13' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ItBehavesLike RSpec/IteratedExpectation: Description: Check that `all` matcher is used instead of iterating over an array. Enabled: true VersionAdded: '1.14' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IteratedExpectation RSpec/LeadingSubject: Description: Enforce that subject is the first definition in the test. Enabled: true VersionAdded: '1.7' VersionChanged: '1.14' StyleGuide: https://rspec.rubystyle.guide/#leading-subject Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeadingSubject RSpec/LeakyConstantDeclaration: Description: Checks that no class, module, or constant is declared. Enabled: true VersionAdded: '1.35' StyleGuide: https://rspec.rubystyle.guide/#declare-constants Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeakyConstantDeclaration RSpec/LetBeforeExamples: Description: Checks for `let` definitions that come after an example. Enabled: true AutoCorrect: contextual VersionAdded: '1.16' VersionChanged: '2.31' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetBeforeExamples RSpec/LetSetup: Description: Checks unreferenced `let!` calls being used for test setup. Enabled: true VersionAdded: '1.7' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetSetup RSpec/MatchArray: Description: Checks where `match_array` is used. Enabled: true VersionAdded: '2.19' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MatchArray RSpec/MessageChain: Description: Check that chains of messages are not being stubbed. Enabled: true VersionAdded: '1.7' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageChain RSpec/MessageExpectation: Description: Checks for consistent message expectation style. Enabled: false EnforcedStyle: allow SupportedStyles: - allow - expect VersionAdded: '1.7' VersionChanged: '1.8' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation RSpec/MessageSpies: Description: Checks that message expectations are set using spies. Enabled: true EnforcedStyle: have_received SupportedStyles: - have_received - receive VersionAdded: '1.9' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies RSpec/MetadataStyle: Description: Use consistent metadata style. Enabled: true EnforcedStyle: symbol SupportedStyles: - hash - symbol VersionAdded: '2.24' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MetadataStyle RSpec/MissingExampleGroupArgument: Description: Checks that the first argument to an example group is not empty. Enabled: true VersionAdded: '1.28' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExampleGroupArgument RSpec/MissingExpectationTargetMethod: Description: Checks if `.to`, `not_to` or `to_not` are used. Enabled: true VersionAdded: '3.0' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExpectationTargetMethod RSpec/MultipleDescribes: Description: Checks for multiple top-level example groups. Enabled: true VersionAdded: '1.0' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleDescribes RSpec/MultipleExpectations: Description: Checks if examples contain too many `expect` calls. Enabled: true Max: 1 VersionAdded: '1.7' VersionChanged: '1.21' StyleGuide: https://rspec.rubystyle.guide/#expectation-per-example Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations RSpec/MultipleMemoizedHelpers: Description: Checks if example groups contain too many `let` and `subject` calls. Enabled: true AllowSubject: true Max: 5 VersionAdded: '1.43' StyleGuide: https://rspec.rubystyle.guide/#let-blocks Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleMemoizedHelpers RSpec/MultipleSubjects: Description: Checks if an example group defines `subject` multiple times. Enabled: true VersionAdded: '1.16' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleSubjects RSpec/NamedSubject: Description: Checks for explicitly referenced test subjects. Enabled: true EnforcedStyle: always SupportedStyles: - always - named_only IgnoreSharedExamples: true VersionAdded: 1.5.3 VersionChanged: '2.15' StyleGuide: https://rspec.rubystyle.guide/#use-subject Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NamedSubject RSpec/NestedGroups: Description: Checks for nested example groups. Enabled: true Max: 3 AllowedGroups: [] VersionAdded: '1.7' VersionChanged: '2.13' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NestedGroups RSpec/NoExpectationExample: Description: Checks if an example contains any expectation. Enabled: true Safe: false VersionAdded: '2.13' VersionChanged: '2.14' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NoExpectationExample AllowedPatterns: - "^expect_" - "^assert_" RSpec/NotToNot: Description: Checks for consistent method usage for negating expectations. Enabled: true EnforcedStyle: not_to SupportedStyles: - not_to - to_not VersionAdded: '1.4' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot RSpec/OverwritingSetup: Description: Checks if there is a let/subject that overwrites an existing one. Enabled: true VersionAdded: '1.14' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/OverwritingSetup RSpec/Pending: Description: Checks for any pending or skipped examples. Enabled: false VersionAdded: '1.25' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Pending RSpec/PendingWithoutReason: Description: Checks for pending or skipped examples without reason. Enabled: true VersionAdded: '2.16' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PendingWithoutReason RSpec/PredicateMatcher: Description: Prefer using predicate matcher over using predicate method directly. Enabled: true Strict: true EnforcedStyle: inflected AllowedExplicitMatchers: [] SupportedStyles: - inflected - explicit SafeAutoCorrect: false VersionAdded: '1.16' StyleGuide: https://rspec.rubystyle.guide/#predicate-matchers Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PredicateMatcher RSpec/ReceiveCounts: Description: Check for `once` and `twice` receive counts matchers usage. Enabled: true VersionAdded: '1.26' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveCounts RSpec/ReceiveMessages: Description: Checks for multiple messages stubbed on the same object. Enabled: true SafeAutoCorrect: false VersionAdded: '2.23' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveMessages RSpec/ReceiveNever: Description: Prefer `not_to receive(...)` over `receive(...).never`. Enabled: true VersionAdded: '1.28' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveNever RSpec/RedundantAround: Description: Remove redundant `around` hook. Enabled: true VersionAdded: '2.19' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RedundantAround RSpec/RedundantPredicateMatcher: Description: Checks for redundant predicate matcher. Enabled: true VersionAdded: '2.26' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RedundantPredicateMatcher RSpec/RemoveConst: Description: Checks that `remove_const` is not used in specs. Enabled: true VersionAdded: '2.26' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RemoveConst RSpec/RepeatedDescription: Description: Check for repeated description strings in example groups. Enabled: true VersionAdded: '1.9' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedDescription RSpec/RepeatedExample: Description: Check for repeated examples within example groups. Enabled: true VersionAdded: '1.10' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExample RSpec/RepeatedExampleGroupBody: Description: Check for repeated describe and context block body. Enabled: true VersionAdded: '1.38' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupBody RSpec/RepeatedExampleGroupDescription: Description: Check for repeated example group descriptions. Enabled: true VersionAdded: '1.38' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupDescription RSpec/RepeatedIncludeExample: Description: Check for repeated include of shared examples. Enabled: true VersionAdded: '1.44' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedIncludeExample RSpec/RepeatedSubjectCall: Description: Checks for repeated calls to subject missing that it is memoized. Enabled: true VersionAdded: '2.27' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedSubjectCall RSpec/ReturnFromStub: Description: Checks for consistent style of stub's return setting. Enabled: true EnforcedStyle: and_return SupportedStyles: - and_return - block VersionAdded: '1.16' VersionChanged: '1.22' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReturnFromStub RSpec/ScatteredLet: Description: Checks for let scattered across the example group. Enabled: true AutoCorrect: contextual VersionAdded: '1.14' VersionChanged: '2.31' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet RSpec/ScatteredSetup: Description: Checks for setup scattered across multiple hooks in an example group. Enabled: true AutoCorrect: contextual VersionAdded: '1.10' VersionChanged: '2.31' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredSetup RSpec/SharedContext: Description: Checks for proper shared_context and shared_examples usage. Enabled: true VersionAdded: '1.13' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedContext RSpec/SharedExamples: Description: Checks for consistent style for shared example names. Enabled: true EnforcedStyle: string SupportedStyles: - string - symbol VersionAdded: '1.25' VersionChanged: '2.26' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedExamples RSpec/SingleArgumentMessageChain: Description: Checks that chains of messages contain more than one element. Enabled: true VersionAdded: '1.9' VersionChanged: '1.10' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SingleArgumentMessageChain RSpec/SkipBlockInsideExample: Description: Checks for passing a block to `skip` within examples. Enabled: true VersionAdded: '2.19' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SkipBlockInsideExample RSpec/SortMetadata: Description: Sort RSpec metadata alphabetically. Enabled: true VersionAdded: '2.14' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SortMetadata RSpec/SpecFilePathFormat: Description: Checks that spec file paths are consistent and well-formed. Enabled: true Include: - "**/*_spec.rb" Exclude: - "**/spec/routing/**/*" CustomTransform: RuboCop: rubocop RSpec: rspec IgnoreMethods: false IgnoreMetadata: type: routing VersionAdded: '2.24' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SpecFilePathFormat RSpec/SpecFilePathSuffix: Description: Checks that spec file paths suffix are consistent and well-formed. Enabled: true VersionAdded: '2.24' Include: - "**/*_spec*rb*" - "**/spec/**/*" Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SpecFilePathSuffix RSpec/StringAsInstanceDoubleConstant: Description: Do not use a string as `instance_double` constant. Enabled: pending Safe: false VersionAdded: '3.1' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/StringAsInstanceDoubleConstant RSpec/StubbedMock: Description: Checks that message expectations do not have a configured response. Enabled: true VersionAdded: '1.44' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/StubbedMock RSpec/SubjectDeclaration: Description: Ensure that subject is defined using subject helper. Enabled: true VersionAdded: '2.5' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SubjectDeclaration RSpec/SubjectStub: Description: Checks for stubbed test subjects. Enabled: true VersionAdded: '1.7' VersionChanged: '2.8' StyleGuide: https://rspec.rubystyle.guide/#dont-stub-subject Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SubjectStub RSpec/UndescriptiveLiteralsDescription: Description: Description should be descriptive. Enabled: true VersionAdded: '2.29' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/UndescriptiveLiteralsDescription RSpec/UnspecifiedException: Description: Checks for a specified error in checking raised errors. Enabled: true VersionAdded: '1.30' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/UnspecifiedException RSpec/VariableDefinition: Description: Checks that memoized helpers names are symbols or strings. Enabled: true EnforcedStyle: symbols SupportedStyles: - symbols - strings VersionAdded: '1.40' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableDefinition RSpec/VariableName: Description: Checks that memoized helper names use the configured style. Enabled: true EnforcedStyle: snake_case SupportedStyles: - snake_case - camelCase AllowedPatterns: [] VersionAdded: '1.40' VersionChanged: '2.13' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableName RSpec/VerifiedDoubleReference: Description: Checks for consistent verified double reference style. Enabled: true SafeAutoCorrect: false EnforcedStyle: constant SupportedStyles: - constant - string VersionAdded: 2.10.0 VersionChanged: '2.12' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VerifiedDoubleReference RSpec/VerifiedDoubles: Description: Prefer using verifying doubles over normal doubles. Enabled: true IgnoreNameless: true IgnoreSymbolicNames: false VersionAdded: 1.2.1 VersionChanged: '1.5' StyleGuide: https://rspec.rubystyle.guide/#doubles Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VerifiedDoubles RSpec/VoidExpect: Description: Checks void `expect()`. Enabled: true VersionAdded: '1.16' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VoidExpect RSpec/Yield: Description: Checks for calling a block within a stub. Enabled: true VersionAdded: '1.32' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield