Upgrade to Version 3.x

Configuration File Update

In version 3.x:

  • cop departments are extracted to another gem. (Capybara, FactoryBot, Rails)

Extraction of cop departments. (Capybara, FactoryBot, Rails)

If you are using the RSpec/Capybara, RSpec/FactoryBot, or RSpec/Rails departments, you need to install the corresponding gem and add it to your .rubocop.yml file.

For example, if you are using the RSpec/Capybara department, you need to install the rubocop-capybara gem and add it to your .rubocop.yml file:

# Gemfile
group :test do
  gem 'rubocop-rspec'
  gem 'rubocop-capybara'
end
Capybara:
  Enabled: true

And you need to remove the old department in your .rubocop.yml file:

RSpec/Capybara:
  Enabled: false

For another example, if you are not using these departments, you don’t need to do anything. And when you update to RuboCop RSpec v3.0.0, you need to remove the old departments from your .rubocop.yml file, e.g.:

RSpec/Capybara:
  Enabled: false
RSpec/FactoryBot:
  Enabled: false
RSpec/Rails:
  Enabled: false