Skip to content

Commit

Permalink
Better assist rspec rails cop users when migrating to 3
Browse files Browse the repository at this point in the history
Previously you would first get:
```
Error: The `RSpec/Rails/InferredSpecType` cop has been moved to `RSpecRails/InferredSpecType`.
(obsolete configuration found in .rubocop.yml, please update it)
```

Then after renaming the cop, you would get:
```
Error: unrecognized cop or department RSpecRails/InferredSpecType found in .rubocop.yml
Did you mean `RSpec/RepeatedDescription`?
```

Which would be a dead end.
  • Loading branch information
jeppester committed Jun 24, 2024
1 parent 11f5cb8 commit 23872d9
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions config/obsoletion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,6 @@ changed_parameters:
alternative: AllowedPatterns
severity: warning

renamed:
RSpec/Capybara/CurrentPathExpectation: Capybara/CurrentPathExpectation
RSpec/Capybara/MatchStyle: Capybara/MatchStyle
RSpec/Capybara/NegationMatcher: Capybara/NegationMatcher
RSpec/Capybara/SpecificActions: Capybara/SpecificActions
RSpec/Capybara/SpecificFinders: Capybara/SpecificFinders
RSpec/Capybara/SpecificMatcher: Capybara/SpecificMatcher
RSpec/Capybara/VisibilityMatcher: Capybara/VisibilityMatcher
RSpec/FactoryBot/AttributeDefinedStatically: FactoryBot/AttributeDefinedStatically
RSpec/FactoryBot/ConsistentParenthesesStyle: FactoryBot/ConsistentParenthesesStyle
RSpec/FactoryBot/CreateList: FactoryBot/CreateList
RSpec/FactoryBot/FactoryClassName: FactoryBot/FactoryClassName
RSpec/FactoryBot/FactoryNameStyle: FactoryBot/FactoryNameStyle
RSpec/FactoryBot/SyntaxMethods: FactoryBot/SyntaxMethods
RSpec/Rails/AvoidSetupHook: RSpecRails/AvoidSetupHook
RSpec/Rails/HaveHttpStatus: RSpecRails/HaveHttpStatus
RSpec/Rails/HttpStatus: RSpecRails/HttpStatus
RSpec/Rails/InferredSpecType: RSpecRails/InferredSpecType
RSpec/Rails/MinitestAssertions: RSpecRails/MinitestAssertions
RSpec/Rails/NegationBeValid: RSpecRails/NegationBeValid
RSpec/Rails/TravelAround: RSpecRails/TravelAround

split:
RSpec/FilePath:
alternatives:
Expand All @@ -45,3 +23,8 @@ removed:
RSpec/Capybara/FeatureMethods:
reason: >
this cop has migrated to `RSpec/Dialect`. Please use `RSpec/Dialect` instead
extracted:
RSpec/Rails/*: rubocop-rspec_rails
RSpec/FactoryBot/*: rubocop-factory_bot
RSpec/Capybara/*: rubocop-capybara

0 comments on commit 23872d9

Please sign in to comment.