diff --git a/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb b/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb index 48289fdf3..6b9b023ba 100644 --- a/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb +++ b/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb @@ -29,7 +29,7 @@ module Capybara # # good # expect(page).to have_current_path('/callback') # - class CurrentPathExpectation < Base + class CurrentPathExpectation < ::RuboCop::Cop::Base extend AutoCorrector MSG = 'Do not set an RSpec expectation on `current_path` in ' \ diff --git a/lib/rubocop/cop/rspec/capybara/negation_matcher.rb b/lib/rubocop/cop/rspec/capybara/negation_matcher.rb index 94af008bc..57e3c7596 100644 --- a/lib/rubocop/cop/rspec/capybara/negation_matcher.rb +++ b/lib/rubocop/cop/rspec/capybara/negation_matcher.rb @@ -24,7 +24,7 @@ module Capybara # expect(page).to have_no_selector # expect(page).to have_no_css('a') # - class NegationMatcher < Base + class NegationMatcher < ::RuboCop::Cop::Base extend AutoCorrector include ConfigurableEnforcedStyle diff --git a/lib/rubocop/cop/rspec/capybara/specific_actions.rb b/lib/rubocop/cop/rspec/capybara/specific_actions.rb index d662e925f..a25a4eb9d 100644 --- a/lib/rubocop/cop/rspec/capybara/specific_actions.rb +++ b/lib/rubocop/cop/rspec/capybara/specific_actions.rb @@ -20,7 +20,7 @@ module Capybara # click_link(exact_text: 'foo') # find('div').click_button # - class SpecificActions < Base + class SpecificActions < ::RuboCop::Cop::Base MSG = "Prefer `%s` over `find('%s').click`." RESTRICT_ON_SEND = %i[click].freeze SPECIFIC_ACTION = { diff --git a/lib/rubocop/cop/rspec/capybara/specific_finders.rb b/lib/rubocop/cop/rspec/capybara/specific_finders.rb index 54acb006c..805e827e5 100644 --- a/lib/rubocop/cop/rspec/capybara/specific_finders.rb +++ b/lib/rubocop/cop/rspec/capybara/specific_finders.rb @@ -15,7 +15,7 @@ module Capybara # find_by_id('some-id') # find_by_id('some-id', visible: true) # - class SpecificFinders < Base + class SpecificFinders < ::RuboCop::Cop::Base extend AutoCorrector include RangeHelp diff --git a/lib/rubocop/cop/rspec/capybara/specific_matcher.rb b/lib/rubocop/cop/rspec/capybara/specific_matcher.rb index 15935700b..e9ef2c01e 100644 --- a/lib/rubocop/cop/rspec/capybara/specific_matcher.rb +++ b/lib/rubocop/cop/rspec/capybara/specific_matcher.rb @@ -26,7 +26,7 @@ module Capybara # expect(page).to have_select # expect(page).to have_field('foo') # - class SpecificMatcher < Base + class SpecificMatcher < ::RuboCop::Cop::Base MSG = 'Prefer `%s` over `%s`.' RESTRICT_ON_SEND = %i[have_selector have_no_selector have_css have_no_css].freeze diff --git a/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb b/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb index c5714332b..99f3a669d 100644 --- a/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb +++ b/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb @@ -26,7 +26,7 @@ module Capybara # expect(page).to have_css('.foo', visible: :all) # expect(page).to have_link('my link', visible: :hidden) # - class VisibilityMatcher < Base + class VisibilityMatcher < ::RuboCop::Cop::Base MSG_FALSE = 'Use `:all` or `:hidden` instead of `false`.' MSG_TRUE = 'Use `:visible` instead of `true`.' CAPYBARA_MATCHER_METHODS = %w[ diff --git a/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb b/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb index 41b2b1314..4c59d5c22 100644 --- a/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb +++ b/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb @@ -25,7 +25,7 @@ module FactoryBot # # good # count { 1 } # - class AttributeDefinedStatically < Base + class AttributeDefinedStatically < ::RuboCop::Cop::Base extend AutoCorrector MSG = 'Use a block to declare attribute values.' diff --git a/lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb b/lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb index bf7f38e14..0b33ceb4a 100644 --- a/lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb +++ b/lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb @@ -40,7 +40,7 @@ module FactoryBot # name: 'foo' # ) # - class ConsistentParenthesesStyle < Base + class ConsistentParenthesesStyle < ::RuboCop::Cop::Base extend AutoCorrector include ConfigurableEnforcedStyle include RuboCop::RSpec::FactoryBot::Language diff --git a/lib/rubocop/cop/rspec/factory_bot/create_list.rb b/lib/rubocop/cop/rspec/factory_bot/create_list.rb index d7e178cd3..996493992 100644 --- a/lib/rubocop/cop/rspec/factory_bot/create_list.rb +++ b/lib/rubocop/cop/rspec/factory_bot/create_list.rb @@ -31,7 +31,7 @@ module FactoryBot # # good # 3.times { create :user } # - class CreateList < Base + class CreateList < ::RuboCop::Cop::Base extend AutoCorrector include ConfigurableEnforcedStyle include RuboCop::RSpec::FactoryBot::Language diff --git a/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb b/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb index a69a4cd7f..0ac4a4514 100644 --- a/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb +++ b/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb @@ -20,7 +20,7 @@ module FactoryBot # factory :foo, class: 'Foo' do # end # - class FactoryClassName < Base + class FactoryClassName < ::RuboCop::Cop::Base extend AutoCorrector MSG = "Pass '%s' string instead of `%s` " \ diff --git a/lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb b/lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb index 35e521e24..570873496 100644 --- a/lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb +++ b/lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb @@ -24,7 +24,7 @@ module FactoryBot # create('user') # build "user", username: "NAME" # - class FactoryNameStyle < Base + class FactoryNameStyle < ::RuboCop::Cop::Base extend AutoCorrector include ConfigurableEnforcedStyle include RuboCop::RSpec::FactoryBot::Language diff --git a/lib/rubocop/cop/rspec/rails/have_http_status.rb b/lib/rubocop/cop/rspec/rails/have_http_status.rb index dac184e64..e466ff010 100644 --- a/lib/rubocop/cop/rspec/rails/have_http_status.rb +++ b/lib/rubocop/cop/rspec/rails/have_http_status.rb @@ -13,7 +13,7 @@ module Rails # # good # expect(response).to have_http_status(200) # - class HaveHttpStatus < Base + class HaveHttpStatus < ::RuboCop::Cop::Base extend AutoCorrector MSG = diff --git a/spec/rubocop/cop/rspec/factory_bot/factory_name_style_spec.rb b/spec/rubocop/cop/rspec/factory_bot/factory_name_style_spec.rb index fdb6532c7..40c62002c 100644 --- a/spec/rubocop/cop/rspec/factory_bot/factory_name_style_spec.rb +++ b/spec/rubocop/cop/rspec/factory_bot/factory_name_style_spec.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true -RSpec.describe RuboCop::Cop::RSpec::FactoryBot::FactoryNameStyle, - :config do +RSpec.describe RuboCop::Cop::RSpec::FactoryBot::FactoryNameStyle, :config do let(:cop_config) do { 'EnforcedStyle' => enforced_style } end