projects, as an extension to RuboCop. Project Goals • Enforce the guidelines and best practices outlined in the community RSpec style guide • Simplify the process of adopting new RSpec functionality
`Enabled: false` is set in .rubocop.yml at the time of major upgrade, it must be deleted. # .rubocop.yml RSpec/Capybara: Enabled: false RSpec/FactoryBot: Enabled: false RSpec/Rails: Enabled: false
extracted gems for backwards compatibility, but this will be removed in the next major version update. # Gemf i le gem 'rubocop - capybara', require: false gem 'rubocop - factory_bot', require: false gem ‘rubocop - rspec_rails’, require: false
cop just by adding it to the Gemfile. You need to add a setting to .rubocop.yml to load the extension into RuboCop, like this: # .rubocop.yml require: - rubocop - capybara - rubocop - factory_bot - rubocop - rspec_rails
a new department. If we need to replace it, we get a warning like this: $ bundle exec rubocop -A .rubocop.yml: RSpec/Capybara/MatchStyle has the wrong namespace - should be Capybara .rubocop.yml: RSpec/FactoryBot/ConsistentParenthesesStyle has the wrong namespace - should be FactoryBot :
department as an example, you can change the cop name as follows: -RSpec/FactoryBot/AttributeDef i nedStatically -RSpec/FactoryBot/ConsistentParenthesesStyle -RSpec/FactoryBot/CreateList +FactoryBot/ConsistentParenthesesStyle +FactoryBot/AttributeDef i nedStatically +FactoryBot/CreateList