From b04ad8c74b8d0d55333f99096eee543e317b48c4 Mon Sep 17 00:00:00 2001 From: Jesse Johnson Date: Wed, 1 Jul 2026 09:46:05 -0700 Subject: [PATCH] Update RBIs and shim --- sorbet/rbi/gems/minitest@5.27.0.rbi | 707 +++++++++++++++++++++++++ sorbet/rbi/gems/rexml@3.4.4.rbi | 167 ------ sorbet/rbi/gems/rubocop-ast@1.49.0.rbi | 6 + sorbet/rbi/gems/rubocop@1.84.2.rbi | 7 + sorbet/rbi/gems/tapioca@0.17.10.rbi | 1 + sorbet/rbi/shims/minitest.rbi | 7 +- 6 files changed, 726 insertions(+), 169 deletions(-) diff --git a/sorbet/rbi/gems/minitest@5.27.0.rbi b/sorbet/rbi/gems/minitest@5.27.0.rbi index a3aea9f..1cd801a 100644 --- a/sorbet/rbi/gems/minitest@5.27.0.rbi +++ b/sorbet/rbi/gems/minitest@5.27.0.rbi @@ -5,6 +5,50 @@ # Please instead update this file by running `bin/tapioca gem minitest`. +# Kernel extensions for minitest +# +# source://minitest//lib/minitest/spec.rb#50 +module Kernel + private + + # Describe a series of expectations for a given target +desc+. + # + # Defines a test class subclassing from either Minitest::Spec or + # from the surrounding describe's class. The surrounding class may + # subclass Minitest::Spec manually in order to easily share code: + # + # class MySpec < Minitest::Spec + # # ... shared code ... + # end + # + # class TestStuff < MySpec + # it "does stuff" do + # # shared code available here + # end + # describe "inner stuff" do + # it "still does stuff" do + # # ...and here + # end + # end + # end + # + # For more information on getting started with writing specs, see: + # + # http://www.rubyinside.com/a-minitestspec-tutorial-elegant-spec-style-testing-that-comes-with-ruby-5354.html + # + # For some suggestions on how to improve your specs, try: + # + # https://betterspecs.org + # + # but do note that several items there are debatable or specific to + # rspec. + # + # For more information about expectations, see Minitest::Expectations. + # + # source://minitest//lib/minitest/spec.rb#86 + def describe(desc, *additional_desc, &block); end +end + # The top-level namespace for Minitest. Also the location of the main # runtime. See +Minitest.run+ for more information. # @@ -272,6 +316,11 @@ module Minitest::Assertions # source://minitest//lib/minitest/assertions.rb#293 def assert_match(matcher, obj, msg = T.unsafe(nil)); end + # Assert that the mock verifies correctly and fail if not. + # + # source://minitest//lib/minitest/mock.rb#241 + def assert_mock(mock, msg = T.unsafe(nil)); end + # Fails unless +obj+ is nil # # source://minitest//lib/minitest/assertions.rb#305 @@ -719,6 +768,289 @@ module Minitest::Compress def compress(orig); end end +# fucking hell rdoc... +# +# source://minitest//lib/minitest/spec.rb#43 +class Minitest::Expectation < ::Struct + # Returns the value of attribute ctx + # + # @return [Object] the current value of ctx + # + # source://minitest//lib/minitest/spec.rb#43 + def ctx; end + + # Sets the attribute ctx + # + # @param value [Object] the value to set the attribute ctx to. + # @return [Object] the newly set value + # + # source://minitest//lib/minitest/spec.rb#43 + def ctx=(_); end + + # source://minitest//lib/minitest/expectations.rb#116 + def must_be(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#47 + def must_be_close_to(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#29 + def must_be_empty(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#76 + def must_be_instance_of(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#85 + def must_be_kind_of(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#103 + def must_be_nil(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#161 + def must_be_same_as(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#170 + def must_be_silent(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#49 + def must_be_within_delta(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#58 + def must_be_within_epsilon(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#38 + def must_equal(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#67 + def must_include(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#94 + def must_match(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#125 + def must_output(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#134 + def must_pattern_match(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#143 + def must_raise(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#152 + def must_respond_to(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#179 + def must_throw(*args, **_arg1); end + + # source://minitest//lib/minitest/mock.rb#257 + def must_verify(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#188 + def path_must_exist(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#197 + def path_wont_exist(*args, **_arg1); end + + # Returns the value of attribute target + # + # @return [Object] the current value of target + # + # source://minitest//lib/minitest/spec.rb#43 + def target; end + + # Sets the attribute target + # + # @param value [Object] the value to set the attribute target to. + # @return [Object] the newly set value + # + # source://minitest//lib/minitest/spec.rb#43 + def target=(_); end + + # source://minitest//lib/minitest/expectations.rb#293 + def wont_be(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#224 + def wont_be_close_to(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#206 + def wont_be_empty(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#253 + def wont_be_instance_of(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#262 + def wont_be_kind_of(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#280 + def wont_be_nil(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#320 + def wont_be_same_as(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#226 + def wont_be_within_delta(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#235 + def wont_be_within_epsilon(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#215 + def wont_equal(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#244 + def wont_include(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#271 + def wont_match(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#302 + def wont_pattern_match(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#311 + def wont_respond_to(*args, **_arg1); end + + class << self + # source://minitest//lib/minitest/spec.rb#43 + def [](*_arg0); end + + # source://minitest//lib/minitest/spec.rb#43 + def inspect; end + + # source://minitest//lib/minitest/spec.rb#43 + def keyword_init?; end + + # source://minitest//lib/minitest/spec.rb#43 + def members; end + + # source://minitest//lib/minitest/spec.rb#43 + def new(*_arg0); end + end +end + +# It's where you hide your "assertions". +# +# Please note, because of the way that expectations are implemented, +# all expectations (eg must_equal) are dependent upon a thread local +# variable +:current_spec+. If your specs rely on mixing threads into +# the specs themselves, you're better off using assertions or the new +# _(value) wrapper. For example: +# +# it "should still work in threads" do +# my_threaded_thingy do +# (1+1).must_equal 2 # bad +# assert_equal 2, 1+1 # good +# _(1 + 1).must_equal 2 # good +# value(1 + 1).must_equal 2 # good, also #expect +# _ { 1 + "1" }.must_raise TypeError # good +# end +# end +# +# source://minitest//lib/minitest/expectations.rb#20 +module Minitest::Expectations + # source://minitest//lib/minitest/expectations.rb#116 + def must_be(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#47 + def must_be_close_to(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#29 + def must_be_empty(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#76 + def must_be_instance_of(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#85 + def must_be_kind_of(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#103 + def must_be_nil(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#161 + def must_be_same_as(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#170 + def must_be_silent(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#49 + def must_be_within_delta(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#58 + def must_be_within_epsilon(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#38 + def must_equal(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#67 + def must_include(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#94 + def must_match(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#125 + def must_output(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#134 + def must_pattern_match(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#143 + def must_raise(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#152 + def must_respond_to(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#179 + def must_throw(*args, **_arg1); end + + # source://minitest//lib/minitest/mock.rb#257 + def must_verify(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#188 + def path_must_exist(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#197 + def path_wont_exist(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#293 + def wont_be(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#224 + def wont_be_close_to(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#206 + def wont_be_empty(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#253 + def wont_be_instance_of(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#262 + def wont_be_kind_of(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#280 + def wont_be_nil(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#320 + def wont_be_same_as(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#226 + def wont_be_within_delta(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#235 + def wont_be_within_epsilon(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#215 + def wont_equal(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#244 + def wont_include(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#271 + def wont_match(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#302 + def wont_pattern_match(*args, **_arg1); end + + # source://minitest//lib/minitest/expectations.rb#311 + def wont_respond_to(*args, **_arg1); end +end + # Provides a simple set of guards that you can use in your tests # to skip execution if it is not applicable. These methods are # mixed into Test as both instance and class methods so you @@ -778,6 +1110,107 @@ module Minitest::Guard def windows?(platform = T.unsafe(nil)); end end +# A simple and clean mock object framework. +# +# All mock objects are an instance of Mock +# +# source://minitest//lib/minitest/mock.rb#10 +class Minitest::Mock + # @return [Mock] a new instance of Mock + # + # source://minitest//lib/minitest/mock.rb#45 + def initialize(delegator = T.unsafe(nil)); end + + # source://minitest//lib/minitest/mock.rb#34 + def ===(*args, **kwargs, &b); end + + # source://minitest//lib/minitest/mock.rb#117 + def __call(name, data); end + + # source://minitest//lib/minitest/mock.rb#11 + def __respond_to?(*_arg0); end + + # source://minitest//lib/minitest/mock.rb#34 + def class(*args, **kwargs, &b); end + + # Expect that method +name+ is called, optionally with +args+ (and + # +kwargs+ or a +blk+), and returns +retval+. + # + # @mock.expect(:meaning_of_life, 42) + # @mock.meaning_of_life # => 42 + # + # @mock.expect(:do_something_with, true, [some_obj, true]) + # @mock.do_something_with(some_obj, true) # => true + # + # @mock.expect(:do_something_else, true) do |a1, a2| + # a1 == "buggs" && a2 == :bunny + # end + # + # +args+ is compared to the expected args using case equality (ie, the + # '===' operator), allowing for less specific expectations. + # + # @mock.expect(:uses_any_string, true, [String]) + # @mock.uses_any_string("foo") # => true + # @mock.verify # => true + # + # @mock.expect(:uses_one_string, true, ["foo"]) + # @mock.uses_one_string("bar") # => raises MockExpectationError + # + # If a method will be called multiple times, specify a new expect for each one. + # They will be used in the order you define them. + # + # @mock.expect(:ordinal_increment, 'first') + # @mock.expect(:ordinal_increment, 'second') + # + # @mock.ordinal_increment # => 'first' + # @mock.ordinal_increment # => 'second' + # @mock.ordinal_increment # => raises MockExpectationError "No more expects available for :ordinal_increment" + # + # source://minitest//lib/minitest/mock.rb#88 + def expect(name, retval, args = T.unsafe(nil), **kwargs, &blk); end + + # source://minitest//lib/minitest/mock.rb#34 + def inspect(*args, **kwargs, &b); end + + # source://minitest//lib/minitest/mock.rb#34 + def instance_eval(*args, **kwargs, &b); end + + # source://minitest//lib/minitest/mock.rb#34 + def instance_variables(*args, **kwargs, &b); end + + # source://minitest//lib/minitest/mock.rb#147 + def method_missing(sym, *args, **kwargs, &block); end + + # source://minitest//lib/minitest/mock.rb#34 + def object_id(*args, **kwargs, &b); end + + # source://minitest//lib/minitest/mock.rb#34 + def public_send(*args, **kwargs, &b); end + + # @return [Boolean] + # + # source://minitest//lib/minitest/mock.rb#229 + def respond_to?(sym, include_private = T.unsafe(nil)); end + + # source://minitest//lib/minitest/mock.rb#34 + def send(*args, **kwargs, &b); end + + # source://minitest//lib/minitest/mock.rb#34 + def to_s(*args, **kwargs, &b); end + + # Verify that all methods were called as expected. Raises + # +MockExpectationError+ if the mock object was not called as + # expected. + # + # source://minitest//lib/minitest/mock.rb#137 + def verify; end + + private + + # source://minitest//lib/minitest/mock.rb#34 + def respond_to_missing?(*args, **kwargs, &b); end +end + # source://minitest//lib/minitest/parallel.rb#4 module Minitest::Parallel; end @@ -1152,6 +1585,242 @@ class Minitest::Skip < ::Minitest::Assertion def result_label; end end +# Minitest::Spec -- The faster, better, less-magical spec framework! +# +# For a list of expectations, see Minitest::Expectations. +# +# source://minitest//lib/minitest/spec.rb#111 +class Minitest::Spec < ::Minitest::Test + include ::Minitest::Spec::DSL::InstanceMethods + extend ::Minitest::Spec::DSL + + # @return [Spec] a new instance of Spec + # + # source://minitest//lib/minitest/spec.rb#117 + def initialize(name); end + + class << self + # source://minitest//lib/minitest/spec.rb#113 + def current; end + end +end + +# Oh look! A Minitest::Spec::DSL module! Eat your heart out DHH. +# +# source://minitest//lib/minitest/spec.rb#125 +module Minitest::Spec::DSL + # Define an 'after' action. Inherits the way normal methods should. + # + # NOTE: +type+ is ignored and is only there to make porting easier. + # + # Equivalent to Minitest::Test#teardown. + # + # source://minitest//lib/minitest/spec.rb#210 + def after(_type = T.unsafe(nil), &block); end + + # Define a 'before' action. Inherits the way normal methods should. + # + # NOTE: +type+ is ignored and is only there to make porting easier. + # + # Equivalent to Minitest::Test#setup. + # + # source://minitest//lib/minitest/spec.rb#196 + def before(_type = T.unsafe(nil), &block); end + + # source://minitest//lib/minitest/spec.rb#179 + def children; end + + # source://minitest//lib/minitest/spec.rb#275 + def create(name, desc); end + + # source://minitest//lib/minitest/spec.rb#295 + def desc; end + + # source://minitest//lib/minitest/spec.rb#175 + def describe_stack; end + + # source://minitest//lib/minitest/spec.rb#293 + def inspect; end + + # Define an expectation with name +desc+. Name gets morphed to a + # proper test method name. For some freakish reason, people who + # write specs don't like class inheritance, so this goes way out of + # its way to make sure that expectations aren't inherited. + # + # This is also aliased to #specify and doesn't require a +desc+ arg. + # + # Hint: If you _do_ want inheritance, use minitest/test. You can mix + # and match between assertions and expectations as much as you want. + # + # source://minitest//lib/minitest/spec.rb#228 + def it(desc = T.unsafe(nil), &block); end + + # Essentially, define an accessor for +name+ with +block+. + # + # Why use let instead of def? I honestly don't know. + # + # @raise [ArgumentError] + # + # source://minitest//lib/minitest/spec.rb#252 + def let(name, &block); end + + # source://minitest//lib/minitest/spec.rb#288 + def name; end + + # source://minitest//lib/minitest/spec.rb#183 + def nuke_test_methods!; end + + # Register a new type of spec that matches the spec's description. + # This method can take either a Regexp and a spec class or a spec + # class and a block that takes the description and returns true if + # it matches. + # + # Eg: + # + # register_spec_type(/Controller$/, Minitest::Spec::Rails) + # + # or: + # + # register_spec_type(Minitest::Spec::RailsModel) do |desc| + # desc.superclass == ActiveRecord::Base + # end + # + # source://minitest//lib/minitest/spec.rb#151 + def register_spec_type(*args, &block); end + + # Figure out the spec class to use based on a spec's description. Eg: + # + # spec_type("BlahController") # => Minitest::Spec::Rails + # + # source://minitest//lib/minitest/spec.rb#165 + def spec_type(desc, *additional); end + + # Define an expectation with name +desc+. Name gets morphed to a + # proper test method name. For some freakish reason, people who + # write specs don't like class inheritance, so this goes way out of + # its way to make sure that expectations aren't inherited. + # + # This is also aliased to #specify and doesn't require a +desc+ arg. + # + # Hint: If you _do_ want inheritance, use minitest/test. You can mix + # and match between assertions and expectations as much as you want. + # + # source://minitest//lib/minitest/spec.rb#296 + def specify(desc = T.unsafe(nil), &block); end + + # Another lazy man's accessor generator. Made even more lazy by + # setting the name for you to +subject+. + # + # source://minitest//lib/minitest/spec.rb#271 + def subject(&block); end + + # source://minitest//lib/minitest/spec.rb#292 + def to_s; end + + class << self + # source://minitest//lib/minitest/spec.rb#339 + def extended(obj); end + end +end + +# Rdoc... why are you so dumb? +# +# source://minitest//lib/minitest/spec.rb#301 +module Minitest::Spec::DSL::InstanceMethods + # Takes a value or a block and returns a value monad that has + # all of Expectations methods available to it. + # + # _(1 + 1).must_equal 2 + # + # And for blocks: + # + # _ { 1 + "1" }.must_raise TypeError + # + # This method of expectation-based testing is preferable to + # straight-expectation methods (on Object) because it stores its + # test context, bypassing our hacky use of thread-local variables. + # + # NOTE: At some point, the methods on Object will be deprecated + # and then removed. + # + # It is also aliased to #value and #expect for your aesthetic + # pleasure: + # + # _(1 + 1).must_equal 2 + # value(1 + 1).must_equal 2 + # expect(1 + 1).must_equal 2 + # + # source://minitest//lib/minitest/spec.rb#326 + def _(value = T.unsafe(nil), &block); end + + # source://minitest//lib/minitest/spec.rb#333 + def before_setup; end + + # Takes a value or a block and returns a value monad that has + # all of Expectations methods available to it. + # + # _(1 + 1).must_equal 2 + # + # And for blocks: + # + # _ { 1 + "1" }.must_raise TypeError + # + # This method of expectation-based testing is preferable to + # straight-expectation methods (on Object) because it stores its + # test context, bypassing our hacky use of thread-local variables. + # + # NOTE: At some point, the methods on Object will be deprecated + # and then removed. + # + # It is also aliased to #value and #expect for your aesthetic + # pleasure: + # + # _(1 + 1).must_equal 2 + # value(1 + 1).must_equal 2 + # expect(1 + 1).must_equal 2 + # + # source://minitest//lib/minitest/spec.rb#331 + def expect(value = T.unsafe(nil), &block); end + + # Takes a value or a block and returns a value monad that has + # all of Expectations methods available to it. + # + # _(1 + 1).must_equal 2 + # + # And for blocks: + # + # _ { 1 + "1" }.must_raise TypeError + # + # This method of expectation-based testing is preferable to + # straight-expectation methods (on Object) because it stores its + # test context, bypassing our hacky use of thread-local variables. + # + # NOTE: At some point, the methods on Object will be deprecated + # and then removed. + # + # It is also aliased to #value and #expect for your aesthetic + # pleasure: + # + # _(1 + 1).must_equal 2 + # value(1 + 1).must_equal 2 + # expect(1 + 1).must_equal 2 + # + # source://minitest//lib/minitest/spec.rb#330 + def value(value = T.unsafe(nil), &block); end +end + +# Contains pairs of matchers and Spec classes to be used to +# calculate the superclass of a top-level describe. This allows for +# automatically customizable spec types. +# +# See: register_spec_type and spec_type +# +# source://minitest//lib/minitest/spec.rb#133 +Minitest::Spec::DSL::TYPES = T.let(T.unsafe(nil), Array) + +# source://minitest//lib/minitest/spec.rb#346 +Minitest::Spec::TYPES = T.let(T.unsafe(nil), Array) + # A reporter that gathers statistics about a test run. Does not do # any IO because meant to be used as a parent class for a reporter # that does. @@ -1547,3 +2216,41 @@ end # source://minitest//lib/minitest.rb#13 Minitest::VERSION = T.let(T.unsafe(nil), String) + +# source://minitest//lib/minitest/mock.rb#1 +class MockExpectationError < ::StandardError; end + +# source://minitest//lib/minitest/spec.rb#3 +class Module + # source://minitest//lib/minitest/spec.rb#4 + def infect_an_assertion(meth, new_name, dont_flip = T.unsafe(nil)); end +end + +# source://minitest//lib/minitest/spec.rb#351 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + include ::Minitest::Expectations + + # Add a temporary stubbed method replacing +name+ for the duration + # of the +block+. If +val_or_callable+ responds to #call, then it + # returns the result of calling it, otherwise returns the value + # as-is. If stubbed method yields a block, +block_args+ will be + # passed along. Cleans up the stub at the end of the +block+. The + # method +name+ must exist before stubbing. + # + # def test_stale_eh + # obj_under_test = Something.new + # refute obj_under_test.stale? + # + # Time.stub :now, Time.at(0) do + # assert obj_under_test.stale? + # end + # end + # -- + # NOTE: keyword args in callables are NOT checked for correctness + # against the existing method. Too many edge cases to be worth it. + # + # source://minitest//lib/minitest/mock.rb#286 + def stub(name, val_or_callable, *block_args, **block_kwargs, &block); end +end diff --git a/sorbet/rbi/gems/rexml@3.4.4.rbi b/sorbet/rbi/gems/rexml@3.4.4.rbi index ca61e29..41b3cd7 100644 --- a/sorbet/rbi/gems/rexml@3.4.4.rbi +++ b/sorbet/rbi/gems/rexml@3.4.4.rbi @@ -1324,31 +1324,15 @@ class REXML::Document < ::REXML::Element def namespaces_cache=(_arg0); end class << self - # Get the entity expansion limit. By default the limit is set to 10000. - # - # Deprecated. Use REXML::Security.entity_expansion_limit= instead. - # # source://rexml//lib/rexml/document.rb#419 def entity_expansion_limit; end - # Set the entity expansion limit. By default the limit is set to 10000. - # - # Deprecated. Use REXML::Security.entity_expansion_limit= instead. - # # source://rexml//lib/rexml/document.rb#412 def entity_expansion_limit=(val); end - # Get the entity expansion limit. By default the limit is set to 10240. - # - # Deprecated. Use REXML::Security.entity_expansion_text_limit instead. - # # source://rexml//lib/rexml/document.rb#433 def entity_expansion_text_limit; end - # Set the entity expansion limit. By default the limit is set to 10240. - # - # Deprecated. Use REXML::Security.entity_expansion_text_limit= instead. - # # source://rexml//lib/rexml/document.rb#426 def entity_expansion_text_limit=(val); end @@ -3335,11 +3319,6 @@ class REXML::Entity < ::REXML::Child def write(out, indent = T.unsafe(nil)); end class << self - # Evaluates whether the given string matches an entity definition, - # returning true if so, and false otherwise. - # - # @return [Boolean] - # # source://rexml//lib/rexml/entity.rb#67 def matches?(string); end end @@ -3501,45 +3480,30 @@ module REXML::Functions # source://rexml//lib/rexml/functions.rb#190 def concat(*objects); end - # Fixed by Mike Stok - # # source://rexml//lib/rexml/functions.rb#204 def contains(string, test); end # source://rexml//lib/rexml/functions.rb#38 def context=(value); end - # Returns the size of the given list of nodes. - # # source://rexml//lib/rexml/functions.rb#60 def count(node_set); end - # UNTESTED - # # source://rexml//lib/rexml/functions.rb#347 def false; end # source://rexml//lib/rexml/functions.rb#413 def floor(number); end - # Helper method. - # # source://rexml//lib/rexml/functions.rb#87 def get_namespace(node_set = T.unsafe(nil)); end - # Since REXML is non-validating, this method is not implemented as it - # requires a DTD - # # source://rexml//lib/rexml/functions.rb#66 def id(object); end - # UNTESTED - # # source://rexml//lib/rexml/functions.rb#352 def lang(language); end - # Returns the last node of the given list of nodes. - # # source://rexml//lib/rexml/functions.rb#51 def last; end @@ -3561,25 +3525,9 @@ module REXML::Functions # source://rexml//lib/rexml/functions.rb#265 def normalize_space(string = T.unsafe(nil)); end - # UNTESTED - # # source://rexml//lib/rexml/functions.rb#337 def not(object); end - # a string that consists of optional whitespace followed by an optional - # minus sign followed by a Number followed by whitespace is converted to - # the IEEE 754 number that is nearest (according to the IEEE 754 - # round-to-nearest rule) to the mathematical value represented by the - # string; any other string is converted to NaN - # - # boolean true is converted to 1; boolean false is converted to 0 - # - # a node-set is first converted to a string as if by a call to the string - # function and then converted in the same way as a string argument - # - # an object of a type other than the four basic types is converted to a - # number in a way that is dependent on that type - # # source://rexml//lib/rexml/functions.rb#387 def number(object = T.unsafe(nil)); end @@ -3598,77 +3546,24 @@ module REXML::Functions # source://rexml//lib/rexml/functions.rb#26 def singleton_method_added(name); end - # Fixed by Mike Stok - # # source://rexml//lib/rexml/functions.rb#199 def starts_with(string, test); end - # A node-set is converted to a string by returning the string-value of the - # node in the node-set that is first in document order. If the node-set is - # empty, an empty string is returned. - # - # A number is converted to a string as follows - # - # NaN is converted to the string NaN - # - # positive zero is converted to the string 0 - # - # negative zero is converted to the string 0 - # - # positive infinity is converted to the string Infinity - # - # negative infinity is converted to the string -Infinity - # - # if the number is an integer, the number is represented in decimal form - # as a Number with no decimal point and no leading zeros, preceded by a - # minus sign (-) if the number is negative - # - # otherwise, the number is represented in decimal form as a Number - # including a decimal point with at least one digit before the decimal - # point and at least one digit after the decimal point, preceded by a - # minus sign (-) if the number is negative; there must be no leading zeros - # before the decimal point apart possibly from the one required digit - # immediately before the decimal point; beyond the one required digit - # after the decimal point there must be as many, but only as many, more - # digits as are needed to uniquely distinguish the number from all other - # IEEE 754 numeric values. - # - # The boolean false value is converted to the string false. The boolean - # true value is converted to the string true. - # - # An object of a type other than the four basic types is converted to a - # string in a way that is dependent on that type. - # # source://rexml//lib/rexml/functions.rb#138 def string(object = T.unsafe(nil)); end - # UNTESTED - # # source://rexml//lib/rexml/functions.rb#261 def string_length(string); end - # A node-set is converted to a string by - # returning the concatenation of the string-value - # of each of the children of the node in the - # node-set that is first in document order. - # If the node-set is empty, an empty string is returned. - # # source://rexml//lib/rexml/functions.rb#178 def string_value(o); end - # Take equal portions of Mike Stok and Sean Russell; mix - # vigorously, and pour into a tall, chilled glass. Serves 10,000. - # # source://rexml//lib/rexml/functions.rb#228 def substring(string, start, length = T.unsafe(nil)); end - # Kouhei fixed this too - # # source://rexml//lib/rexml/functions.rb#220 def substring_after(string, test); end - # Kouhei fixed this - # # source://rexml//lib/rexml/functions.rb#209 def substring_before(string, test); end @@ -3678,13 +3573,9 @@ module REXML::Functions # source://rexml//lib/rexml/functions.rb#40 def text; end - # This is entirely Mike Stok's beast - # # source://rexml//lib/rexml/functions.rb#275 def translate(string, tr1, tr2); end - # UNTESTED - # # source://rexml//lib/rexml/functions.rb#342 def true; end @@ -4690,11 +4581,6 @@ REXML::Source::Private::SPACES_PATTERN = T.let(T.unsafe(nil), Regexp) # source://rexml//lib/rexml/source.rb#38 class REXML::SourceFactory class << self - # Generates a Source object - # - # @param arg Either a String, or an IO - # @return a Source, or nil if a bad argument was given - # # source://rexml//lib/rexml/source.rb#42 def create_from(arg); end end @@ -4880,26 +4766,18 @@ class REXML::Text < ::REXML::Child def clear_cache; end class << self - # check for illegal characters - # # source://rexml//lib/rexml/text.rb#116 def check(string, pattern, doctype = T.unsafe(nil)); end # source://rexml//lib/rexml/text.rb#401 def expand(ref, doctype, filter); end - # Escapes all possible entities - # # source://rexml//lib/rexml/text.rb#363 def normalize(input, doctype = T.unsafe(nil), entity_filter = T.unsafe(nil)); end - # Reads text, substituting entities - # # source://rexml//lib/rexml/text.rb#337 def read_with_substitution(input, illegal = T.unsafe(nil)); end - # Unescapes all possible entities - # # source://rexml//lib/rexml/text.rb#387 def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil), entity_expansion_text_limit: T.unsafe(nil)); end end @@ -5014,12 +4892,6 @@ class REXML::XMLDecl < ::REXML::Child def content(enc); end class << self - # Only use this if you do not want the XML declaration to be written; - # this object is ignored by the XML writer. Otherwise, instantiate your - # own XMLDecl and add it to the document. - # - # Note that XML 1.1 documents *must* include an XML declaration - # # source://rexml//lib/rexml/xmldecl.rb#92 def default; end end @@ -5032,51 +4904,12 @@ class REXML::XPath include ::REXML::Functions class << self - # Iterates over nodes that match the given path, calling the supplied - # block with the match. - # element:: - # The context element - # path:: - # The xpath to search for. If not supplied or nil, defaults to '*' - # namespaces:: - # If supplied, a Hash which defines a namespace mapping - # variables:: - # If supplied, a Hash which maps $variables in the query - # to values. This can be used to avoid XPath injection attacks - # or to automatically handle escaping string values. - # - # XPath.each( node ) { |el| ... } - # XPath.each( node, '/*[@attr='v']' ) { |el| ... } - # XPath.each( node, 'ancestor::x' ) { |el| ... } - # XPath.each( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"}) \ - # {|el| ... } - # # source://rexml//lib/rexml/xpath.rb#55 def each(element, path = T.unsafe(nil), namespaces = T.unsafe(nil), variables = T.unsafe(nil), options = T.unsafe(nil), &block); end - # Finds and returns the first node that matches the supplied xpath. - # element:: - # The context element - # path:: - # The xpath to search for. If not supplied or nil, returns the first - # node matching '*'. - # namespaces:: - # If supplied, a Hash which defines a namespace mapping. - # variables:: - # If supplied, a Hash which maps $variables in the query - # to values. This can be used to avoid XPath injection attacks - # or to automatically handle escaping string values. - # - # XPath.first( node ) - # XPath.first( doc, "//b"} ) - # XPath.first( node, "a/x:b", { "x"=>"http://doofus" } ) - # XPath.first( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"}) - # # source://rexml//lib/rexml/xpath.rb#31 def first(element, path = T.unsafe(nil), namespaces = T.unsafe(nil), variables = T.unsafe(nil), options = T.unsafe(nil)); end - # Returns an array of nodes matching a given XPath. - # # source://rexml//lib/rexml/xpath.rb#62 def match(element, path = T.unsafe(nil), namespaces = T.unsafe(nil), variables = T.unsafe(nil), options = T.unsafe(nil)); end end diff --git a/sorbet/rbi/gems/rubocop-ast@1.49.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.49.0.rbi index f710208..f1e8ca9 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.49.0.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.49.0.rbi @@ -5563,6 +5563,9 @@ RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_MAP_FILTER_MAP = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MATCH_MATCH_ = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_MODULE_FUNCTION_RUBY2_KEYWORDS = T.let(T.unsafe(nil), Set) @@ -5644,6 +5647,9 @@ RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TASK_NAMESPACE = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set) diff --git a/sorbet/rbi/gems/rubocop@1.84.2.rbi b/sorbet/rbi/gems/rubocop@1.84.2.rbi index 3f96d44..e35efd9 100644 --- a/sorbet/rbi/gems/rubocop@1.84.2.rbi +++ b/sorbet/rbi/gems/rubocop@1.84.2.rbi @@ -29997,6 +29997,13 @@ module RuboCop::Cop::MinBranchesCount def min_branches_count?(node); end end +module RuboCop::Cop::Minitest; end + +class RuboCop::Cop::Minitest::MultipleAssertions < ::RuboCop::Cop::Base + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::DefNode +end + # Common code for indenting the first elements in multiline # array literals, hash literals, and method definitions. # diff --git a/sorbet/rbi/gems/tapioca@0.17.10.rbi b/sorbet/rbi/gems/tapioca@0.17.10.rbi index 679a47b..7c5fcfe 100644 --- a/sorbet/rbi/gems/tapioca@0.17.10.rbi +++ b/sorbet/rbi/gems/tapioca@0.17.10.rbi @@ -3116,6 +3116,7 @@ Tapioca::Runtime::SourceLocation::EVAL_SOURCE_FILE_PATTERN = T.let(T.unsafe(nil) # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#6 module Tapioca::Runtime::Trackers class << self + # source://tapioca//lib/tapioca/runtime/trackers.rb#30 def disable_all!; end # source://tapioca//lib/tapioca/runtime/trackers.rb#35 diff --git a/sorbet/rbi/shims/minitest.rbi b/sorbet/rbi/shims/minitest.rbi index ccc6a13..adb27e0 100644 --- a/sorbet/rbi/shims/minitest.rbi +++ b/sorbet/rbi/shims/minitest.rbi @@ -35,9 +35,12 @@ module Minitest def it(desc = T.unsafe(nil), &block); end sig do - params(block: T.proc.bind(T.attached_class).void).void + params( + type: T.anything, + block: T.proc.bind(T.attached_class).void, + ).void end - def before(&block); end + def before(type = T.unsafe(nil), &block); end end end end