config/default.yml in rubocop-rspec-2.31.0 vs config/default.yml in rubocop-rspec-3.0.0.pre

- old
+ new

@@ -1,14 +1,14 @@ --- RSpec: Enabled: true StyleGuideBaseURL: https://rspec.rubystyle.guide DocumentationBaseURL: https://docs.rubocop.org/rubocop-rspec - Include: &1 + Include: - "**/*_spec.rb" - "**/spec/**/*" - Language: &2 + Language: inherit_mode: merge: - Expectations - Helpers - Hooks @@ -144,19 +144,19 @@ 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: pending + 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: pending + Enabled: true Safe: false VersionAdded: 2.9.0 VersionChanged: '2.16' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEq @@ -168,11 +168,11 @@ 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: pending + Enabled: true EnforcedStyle: be_nil SupportedStyles: - be - be_nil VersionAdded: 2.9.0 @@ -191,30 +191,30 @@ 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: pending + 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: pending + 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: pending + 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." @@ -304,11 +304,11 @@ VersionAdded: '1.33' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Dialect RSpec/DuplicatedMetadata: Description: Avoid duplicated metadata. - Enabled: pending + 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. @@ -365,25 +365,25 @@ 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: pending + 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: pending + 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: pending + Enabled: true VersionAdded: '2.24' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Eq RSpec/ExampleLength: Description: Checks for long examples. @@ -421,11 +421,11 @@ 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: pending + 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. @@ -454,35 +454,20 @@ 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: pending + 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/FilePath: - Description: Checks that spec file paths are consistent and well-formed. - Enabled: true - Include: - - "**/*_spec*rb*" - - "**/spec/**/*" - CustomTransform: - RuboCop: rubocop - RSpec: rspec - IgnoreMethods: false - SpecSuffixOnly: false - VersionAdded: '1.2' - VersionChanged: '2.24' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FilePath - RSpec/Focus: Description: Checks if examples are focused. Enabled: true AutoCorrect: contextual VersionAdded: '1.5' @@ -509,11 +494,11 @@ 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: pending + 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. @@ -546,11 +531,11 @@ 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: pending + Enabled: true VersionAdded: '2.20' VersionChanged: '2.23' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IndexedLet Max: 1 AllowedIdentifiers: [] @@ -571,11 +556,11 @@ 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: pending + 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: @@ -623,11 +608,11 @@ 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: pending + 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. @@ -656,11 +641,11 @@ VersionAdded: '1.9' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies RSpec/MetadataStyle: Description: Use consistent metadata style. - Enabled: pending + Enabled: true EnforcedStyle: symbol SupportedStyles: - hash - symbol VersionAdded: '2.24' @@ -670,10 +655,16 @@ 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 @@ -724,11 +715,11 @@ 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: pending + Enabled: true Safe: false VersionAdded: '2.13' VersionChanged: '2.14' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NoExpectationExample AllowedPatterns: @@ -757,11 +748,11 @@ 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: pending + 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. @@ -783,11 +774,11 @@ 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: pending + Enabled: true SafeAutoCorrect: false VersionAdded: '2.23' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveMessages RSpec/ReceiveNever: @@ -796,23 +787,23 @@ VersionAdded: '1.28' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveNever RSpec/RedundantAround: Description: Remove redundant `around` hook. - Enabled: pending + 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: pending + 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: pending + 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. @@ -844,11 +835,11 @@ 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: pending + 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. @@ -901,23 +892,23 @@ 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: pending + 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: pending + 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: pending + Enabled: true Include: - "**/*_spec.rb" Exclude: - "**/spec/routing/**/*" CustomTransform: @@ -929,11 +920,11 @@ 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: pending + Enabled: true VersionAdded: '2.24' Include: - "**/*_spec*rb*" - "**/spec/**/*" Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SpecFilePathSuffix @@ -944,11 +935,11 @@ 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: pending + 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. @@ -958,11 +949,11 @@ 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: pending + 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. @@ -992,11 +983,11 @@ 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: pending + Enabled: true SafeAutoCorrect: false EnforcedStyle: constant SupportedStyles: - constant - string @@ -1023,218 +1014,5 @@ 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 - -RSpec/Capybara: - Enabled: true - Include: *1 - Language: *2 - -RSpec/Capybara/CurrentPathExpectation: - Description: Checks that no expectations are set on Capybara's `current_path`. - Enabled: true - VersionAdded: '1.18' - VersionChanged: '2.0' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/CurrentPathExpectation - -RSpec/Capybara/FeatureMethods: - Description: Checks for consistent method usage in feature specs. - Enabled: true - EnabledMethods: [] - VersionAdded: '1.17' - VersionChanged: '2.0' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/FeatureMethods - -RSpec/Capybara/MatchStyle: - Description: Checks for usage of deprecated style methods. - Enabled: pending - VersionAdded: '2.17' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/MatchStyle - -RSpec/Capybara/NegationMatcher: - Description: Enforces use of `have_no_*` or `not_to` for negated expectations. - Enabled: pending - VersionAdded: '2.14' - EnforcedStyle: not_to - SupportedStyles: - - have_no - - not_to - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/NegationMatcher - -RSpec/Capybara/SpecificActions: - Description: Checks for there is a more specific actions offered by Capybara. - Enabled: pending - VersionAdded: '2.14' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/SpecificActions - -RSpec/Capybara/SpecificFinders: - Description: Checks if there is a more specific finder offered by Capybara. - Enabled: pending - VersionAdded: '2.13' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/SpecificFinders - -RSpec/Capybara/SpecificMatcher: - Description: Checks for there is a more specific matcher offered by Capybara. - Enabled: pending - VersionAdded: '2.12' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/SpecificMatcher - -RSpec/Capybara/VisibilityMatcher: - Description: Checks for boolean visibility in Capybara finders. - Enabled: true - VersionAdded: '1.39' - VersionChanged: '2.0' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/VisibilityMatcher - -RSpec/FactoryBot: - Enabled: true - Include: *1 - Language: *2 - -RSpec/FactoryBot/AttributeDefinedStatically: - Description: Always declare attribute values as blocks. - Enabled: true - Include: - - "**/spec/factories.rb" - - "**/spec/factories/**/*.rb" - - "**/features/support/factories/**/*.rb" - VersionAdded: '1.28' - VersionChanged: '2.23' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically - -RSpec/FactoryBot/ConsistentParenthesesStyle: - Description: Use a consistent style for parentheses in factory bot calls. - Enabled: pending - EnforcedStyle: require_parentheses - SupportedStyles: - - require_parentheses - - omit_parentheses - VersionAdded: '2.14' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/ConsistentParenthesesStyle - -RSpec/FactoryBot/CreateList: - Description: Checks for create_list usage. - Enabled: true - Include: - - "**/*_spec.rb" - - "**/spec/**/*" - - "**/spec/factories.rb" - - "**/spec/factories/**/*.rb" - - "**/features/support/factories/**/*.rb" - EnforcedStyle: create_list - SupportedStyles: - - create_list - - n_times - VersionAdded: '1.25' - VersionChanged: '2.23' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList - -RSpec/FactoryBot/FactoryClassName: - Description: Use string value when setting the class attribute explicitly. - Enabled: true - Include: - - "**/spec/factories.rb" - - "**/spec/factories/**/*.rb" - - "**/features/support/factories/**/*.rb" - VersionAdded: '1.37' - VersionChanged: '2.23' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName - -RSpec/FactoryBot/FactoryNameStyle: - Description: Checks for name style for argument of FactoryBot::Syntax::Methods. - Enabled: pending - VersionAdded: '2.16' - EnforcedStyle: symbol - SupportedStyles: - - symbol - - string - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryNameStyle - -RSpec/FactoryBot/SyntaxMethods: - Description: Use shorthands from `FactoryBot::Syntax::Methods` in your specs. - Enabled: pending - SafeAutoCorrect: false - VersionAdded: '2.7' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/SyntaxMethods - -RSpec/Rails: - Enabled: true - Include: *1 - Language: *2 - -RSpec/Rails/AvoidSetupHook: - Description: Checks that tests use RSpec `before` hook over Rails `setup` method. - Enabled: pending - VersionAdded: '2.4' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/AvoidSetupHook - -RSpec/Rails/HaveHttpStatus: - Description: Checks that tests use `have_http_status` instead of equality matchers. - Enabled: pending - ResponseMethods: - - response - - last_response - SafeAutoCorrect: false - VersionAdded: '2.12' - VersionChanged: '2.27' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HaveHttpStatus - -RSpec/Rails/HttpStatus: - Description: Enforces use of symbolic or numeric value to describe HTTP status. - Enabled: true - EnforcedStyle: symbolic - SupportedStyles: - - numeric - - symbolic - - be_status - VersionAdded: '1.23' - VersionChanged: '2.20' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus - -RSpec/Rails/InferredSpecType: - Description: Identifies redundant spec type. - Enabled: pending - Safe: false - VersionAdded: '2.14' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/InferredSpecType - Inferences: - channels: channel - controllers: controller - features: feature - generator: generator - helpers: helper - jobs: job - mailboxes: mailbox - mailers: mailer - models: model - requests: request - integration: request - api: request - routing: routing - system: system - views: view - -RSpec/Rails/MinitestAssertions: - Description: Check if using Minitest-like matchers. - Enabled: pending - VersionAdded: '2.17' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/MinitestAssertions - -RSpec/Rails/NegationBeValid: - Description: Enforces use of `be_invalid` or `not_to` for negated be_valid. - Safe: false - EnforcedStyle: not_to - SupportedStyles: - - not_to - - be_invalid - Enabled: pending - VersionAdded: '2.23' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/NegationBeValid - -RSpec/Rails/TravelAround: - Description: Prefer to travel in `before` rather than `around`. - Enabled: pending - Safe: false - VersionAdded: '2.19' - Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/TravelAround