diff --git a/Gemfile b/Gemfile index ed5688187..432f9d789 100644 --- a/Gemfile +++ b/Gemfile @@ -16,7 +16,7 @@ group :development do gem "rake", "~> 13.0" gem "rubocop", "~> 1.57" gem "rubocop-shopify", "~> 2.14", require: false - gem "rubocop-minitest", "~> 0.32.2", require: false + gem "rubocop-minitest", "~> 0.33.0", require: false gem "rubocop-rake", "~> 0.6.0", require: false gem "rubocop-sorbet", "~> 0.7", require: false gem "sorbet-static-and-runtime", platforms: NON_WINDOWS_PLATFORMS diff --git a/Gemfile.lock b/Gemfile.lock index b86dc940e..b4a440732 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -66,7 +66,7 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) - rubocop-minitest (0.32.2) + rubocop-minitest (0.33.0) rubocop (>= 1.39, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) @@ -76,14 +76,14 @@ GEM rubocop (>= 0.90.0) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - sorbet (0.5.11074) - sorbet-static (= 0.5.11074) - sorbet-runtime (0.5.11074) - sorbet-static (0.5.11074-universal-darwin) - sorbet-static (0.5.11074-x86_64-linux) - sorbet-static-and-runtime (0.5.11074) - sorbet (= 0.5.11074) - sorbet-runtime (= 0.5.11074) + sorbet (0.5.11089) + sorbet-static (= 0.5.11089) + sorbet-runtime (0.5.11089) + sorbet-static (0.5.11089-universal-darwin) + sorbet-static (0.5.11089-x86_64-linux) + sorbet-static-and-runtime (0.5.11089) + sorbet (= 0.5.11089) + sorbet-runtime (= 0.5.11089) spoom (1.2.4) erubi (>= 1.10.0) sorbet-static-and-runtime (>= 0.5.10187) @@ -126,7 +126,7 @@ DEPENDENCIES rake (~> 13.0) rdoc rubocop (~> 1.57) - rubocop-minitest (~> 0.32.2) + rubocop-minitest (~> 0.33.0) rubocop-rake (~> 0.6.0) rubocop-shopify (~> 2.14) rubocop-sorbet (~> 0.7) diff --git a/sorbet/rbi/gems/rubocop-minitest@0.32.2.rbi b/sorbet/rbi/gems/rubocop-minitest@0.33.0.rbi similarity index 96% rename from sorbet/rbi/gems/rubocop-minitest@0.32.2.rbi rename to sorbet/rbi/gems/rubocop-minitest@0.33.0.rbi index 2373bd76e..e7c62ba16 100644 --- a/sorbet/rbi/gems/rubocop-minitest@0.32.2.rbi +++ b/sorbet/rbi/gems/rubocop-minitest@0.33.0.rbi @@ -147,45 +147,28 @@ RuboCop::Cop::Minitest::AssertEmptyLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(ni # @example # # bad # assert("rubocop-minitest" == actual) +# assert_operator("rubocop-minitest", :==, actual) # # # good # assert_equal("rubocop-minitest", actual) # -# source://rubocop-minitest//lib/rubocop/cop/minitest/assert_equal.rb#16 +# source://rubocop-minitest//lib/rubocop/cop/minitest/assert_equal.rb#17 class RuboCop::Cop::Minitest::AssertEqual < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::ArgumentRangeHelper - extend ::RuboCop::Cop::MinitestCopRule extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#58 - def autocorrect(corrector, node, arguments); end + # source://rubocop-minitest//lib/rubocop/cop/minitest/assert_equal.rb#24 + def assert_equal(param0 = T.unsafe(nil)); end - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#46 + # source://rubocop-minitest//lib/rubocop/cop/minitest/assert_equal.rb#32 def on_send(node); end - - private - - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#110 - def correct_receiver(receiver); end - - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#106 - def enclosed_in_redundant_parentheses?(node); end - - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#92 - def new_arguments(arguments); end - - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#78 - def offense_message(arguments); end - - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#72 - def peel_redundant_parentheses_from(arguments); end end -# source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#43 +# source://rubocop-minitest//lib/rubocop/cop/minitest/assert_equal.rb#21 RuboCop::Cop::Minitest::AssertEqual::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#44 +# source://rubocop-minitest//lib/rubocop/cop/minitest/assert_equal.rb#22 RuboCop::Cop::Minitest::AssertEqual::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Enforces the test to use `assert_in_delta` @@ -351,47 +334,35 @@ RuboCop::Cop::Minitest::AssertKindOf::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # assert(matcher.match(string)) # assert(matcher.match?(string)) # assert(matcher =~ string) +# assert_operator(matcher, :=~, string) # assert(matcher.match(string), 'message') # # # good # assert_match(regex, string) # assert_match(matcher, string, 'message') # -# source://rubocop-minitest//lib/rubocop/cop/minitest/assert_match.rb#20 +# source://rubocop-minitest//lib/rubocop/cop/minitest/assert_match.rb#21 class RuboCop::Cop::Minitest::AssertMatch < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::ArgumentRangeHelper - extend ::RuboCop::Cop::MinitestCopRule extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#58 - def autocorrect(corrector, node, arguments); end + # source://rubocop-minitest//lib/rubocop/cop/minitest/assert_match.rb#28 + def assert_match(param0 = T.unsafe(nil)); end - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#46 + # source://rubocop-minitest//lib/rubocop/cop/minitest/assert_match.rb#36 def on_send(node); end private - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#110 - def correct_receiver(receiver); end - - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#106 - def enclosed_in_redundant_parentheses?(node); end - - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#92 - def new_arguments(arguments); end - - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#78 - def offense_message(arguments); end - - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#72 - def peel_redundant_parentheses_from(arguments); end + # source://rubocop-minitest//lib/rubocop/cop/minitest/assert_match.rb#59 + def order_expected_and_actual(expected, actual); end end -# source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#43 +# source://rubocop-minitest//lib/rubocop/cop/minitest/assert_match.rb#25 RuboCop::Cop::Minitest::AssertMatch::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#44 +# source://rubocop-minitest//lib/rubocop/cop/minitest/assert_match.rb#26 RuboCop::Cop::Minitest::AssertMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Enforces the test to use `assert_nil` instead of using @@ -1556,38 +1527,30 @@ RuboCop::Cop::Minitest::RefuteEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # @example # # bad # assert("rubocop-minitest" != actual) +# refute("rubocop-minitest" == actual) +# assert_operator("rubocop-minitest", :!=, actual) +# refute_operator("rubocop-minitest", :==, actual) # # # good # refute_equal("rubocop-minitest", actual) # -# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#16 +# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#19 class RuboCop::Cop::Minitest::RefuteEqual < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::ArgumentRangeHelper extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#23 - def assert_not_equal(param0 = T.unsafe(nil)); end - - # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#27 + # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#36 def on_send(node); end - private - - # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#49 - def original_usage(first_part, custom_message); end - - # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#45 - def preferred_usage(first_arg, second_arg, custom_message = T.unsafe(nil)); end - - # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#53 - def process_not_equal(node); end + # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#26 + def refute_equal(param0 = T.unsafe(nil)); end end -# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#20 +# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#23 RuboCop::Cop::Minitest::RefuteEqual::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#21 +# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#24 RuboCop::Cop::Minitest::RefuteEqual::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Enforces the use of `refute(object)` over `assert_equal(false, object)`. @@ -1797,47 +1760,36 @@ RuboCop::Cop::Minitest::RefuteKindOf::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # refute(matcher.match(string)) # refute(matcher.match?(string)) # refute(matcher =~ string) +# refute_operator(matcher, :=~, string) +# assert_operator(matcher, :!~, string) # refute(matcher.match(string), 'message') # # # good # refute_match(matcher, string) # refute_match(matcher, string, 'message') # -# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_match.rb#20 +# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_match.rb#22 class RuboCop::Cop::Minitest::RefuteMatch < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::ArgumentRangeHelper - extend ::RuboCop::Cop::MinitestCopRule extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#58 - def autocorrect(corrector, node, arguments); end - - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#46 + # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_match.rb#38 def on_send(node); end - private + # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_match.rb#29 + def refute_match(param0 = T.unsafe(nil)); end - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#110 - def correct_receiver(receiver); end - - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#106 - def enclosed_in_redundant_parentheses?(node); end - - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#92 - def new_arguments(arguments); end - - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#78 - def offense_message(arguments); end + private - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#72 - def peel_redundant_parentheses_from(arguments); end + # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_match.rb#61 + def order_expected_and_actual(expected, actual); end end -# source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#43 +# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_match.rb#26 RuboCop::Cop::Minitest::RefuteMatch::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#44 +# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_match.rb#27 RuboCop::Cop::Minitest::RefuteMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Enforces the test to use `refute_nil` instead of using