Skip to content

Commit 9317157

Browse files
committed
Change superclass for many cops
Let's depend as little as possible on `::RuboCop::Cop::RSpec::Base` as cop superclass. Now, only `InferredSpecType` inherits from rubocop-rspec's base class.
1 parent 2f02f4b commit 9317157

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

lib/rubocop/cop/rspec_rails/avoid_setup_hook.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module RSpecRails
1616
# allow(foo).to receive(:bar)
1717
# end
1818
#
19-
class AvoidSetupHook < ::RuboCop::Cop::RSpec::Base
19+
class AvoidSetupHook < ::RuboCop::Cop::Base
2020
extend AutoCorrector
2121

2222
MSG = 'Use `before` instead of `setup`.'

lib/rubocop/cop/rspec_rails/http_status.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module RSpecRails
5757
# it { is_expected.to have_http_status :success }
5858
# it { is_expected.to have_http_status :error }
5959
#
60-
class HttpStatus < ::RuboCop::Cop::RSpec::Base
60+
class HttpStatus < ::RuboCop::Cop::Base
6161
extend AutoCorrector
6262
include ConfigurableEnforcedStyle
6363
RESTRICT_ON_SEND = %i[have_http_status].freeze

lib/rubocop/cop/rspec_rails/minitest_assertions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module RSpecRails
2929
# expect(a).to be(true)
3030
# expect(a).to be(false)
3131
#
32-
class MinitestAssertions < ::RuboCop::Cop::RSpec::Base
32+
class MinitestAssertions < ::RuboCop::Cop::Base
3333
extend AutoCorrector
3434

3535
# :nodoc:

lib/rubocop/cop/rspec_rails/negation_be_valid.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module RSpecRails
2929
# # good (with method chain)
3030
# expect(foo).to be_invalid.or be_even
3131
#
32-
class NegationBeValid < ::RuboCop::Cop::RSpec::Base
32+
class NegationBeValid < ::RuboCop::Cop::Base
3333
extend AutoCorrector
3434
include ConfigurableEnforcedStyle
3535

lib/rubocop/cop/rspec_rails/travel_around.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module RSpecRails
2323
#
2424
# # good
2525
# before { freeze_time }
26-
class TravelAround < ::RuboCop::Cop::RSpec::Base
26+
class TravelAround < ::RuboCop::Cop::Base
2727
extend AutoCorrector
2828

2929
MSG = 'Prefer to travel in `before` rather than `around`.'

0 commit comments

Comments
 (0)