brew/Library/Homebrew/sorbet/rbi/gems/minitest@5.22.2.rbi

1536 lines
42 KiB
Plaintext
Raw Normal View History

2021-12-15 18:12:40 +00:00
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `minitest` gem.
2021-09-17 19:28:50 +01:00
# Please instead update this file by running `bin/tapioca gem minitest`.
2023-12-14 15:34:15 +00:00
# :include: README.rdoc
#
# source://minitest//lib/minitest/parallel.rb#1
2021-09-10 21:21:17 +01:00
module Minitest
class << self
2023-12-14 15:34:15 +00:00
# Internal run method. Responsible for telling all Runnable
# sub-classes to run.
#
# source://minitest//lib/minitest.rb#197
2021-09-10 21:21:17 +01:00
def __run(reporter, options); end
2023-12-14 15:34:15 +00:00
# A simple hook allowing you to run a block of code after everything
# is done running. Eg:
#
# Minitest.after_run { p $debugging_info }
#
# source://minitest//lib/minitest.rb#97
2021-09-10 21:21:17 +01:00
def after_run(&block); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
def allow_fork; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
def allow_fork=(_arg0); end
2023-12-14 15:34:15 +00:00
# Registers Minitest to run at process exit
#
# source://minitest//lib/minitest.rb#69
2021-09-10 21:21:17 +01:00
def autorun; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
2021-09-10 21:21:17 +01:00
def backtrace_filter; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
2021-09-10 21:21:17 +01:00
def backtrace_filter=(_arg0); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#18
2022-06-15 18:10:01 +00:00
def cattr_accessor(name); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#1146
2021-09-10 21:21:17 +01:00
def clock_time; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#177
def empty_run!(options); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
2021-09-10 21:21:17 +01:00
def extensions; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
2021-09-10 21:21:17 +01:00
def extensions=(_arg0); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#292
2021-09-10 21:21:17 +01:00
def filter_backtrace(bt); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
2021-09-10 21:21:17 +01:00
def info_signal; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
2021-09-10 21:21:17 +01:00
def info_signal=(_arg0); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#101
2021-09-10 21:21:17 +01:00
def init_plugins(options); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#108
2021-09-10 21:21:17 +01:00
def load_plugins; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
2021-09-10 21:21:17 +01:00
def parallel_executor; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
2021-09-10 21:21:17 +01:00
def parallel_executor=(_arg0); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#210
2021-09-10 21:21:17 +01:00
def process_args(args = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
2021-09-10 21:21:17 +01:00
def reporter; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
2021-09-10 21:21:17 +01:00
def reporter=(_arg0); end
2023-12-14 15:34:15 +00:00
# This is the top-level run method. Everything starts from here. It
# tells each Runnable sub-class to run, and each of those are
# responsible for doing whatever they do.
#
# The overall structure of a run looks like this:
#
# Minitest.autorun
# Minitest.run(args)
# Minitest.__run(reporter, options)
# Runnable.runnables.each
# runnable_klass.run(reporter, options)
2023-12-14 15:34:15 +00:00
# self.runnable_methods.each
# self.run_one_method(self, runnable_method, reporter)
# Minitest.run_one_method(klass, runnable_method)
# klass.new(runnable_method).run
#
# source://minitest//lib/minitest.rb#143
2021-09-10 21:21:17 +01:00
def run(args = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#1137
2021-09-10 21:21:17 +01:00
def run_one_method(klass, method_name); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
2022-06-15 18:10:01 +00:00
def seed; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#19
2022-06-15 18:10:01 +00:00
def seed=(_arg0); end
2021-09-10 21:21:17 +01:00
end
end
2023-12-14 15:34:15 +00:00
# Defines the API for Reporters. Subclass this and override whatever
# you want. Go nuts.
#
# source://minitest//lib/minitest.rb#638
2021-09-10 21:21:17 +01:00
class Minitest::AbstractReporter
# @return [AbstractReporter] a new instance of AbstractReporter
#
# source://minitest//lib/minitest.rb#640
def initialize; end
2023-12-14 15:34:15 +00:00
# Did this run pass?
#
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#675
2021-09-10 21:21:17 +01:00
def passed?; end
2023-12-14 15:34:15 +00:00
# About to start running a test. This allows a reporter to show
# that it is starting or that we are in the middle of a test run.
#
# source://minitest//lib/minitest.rb#654
2021-09-10 21:21:17 +01:00
def prerecord(klass, name); end
2023-12-14 15:34:15 +00:00
# Output and record the result of the test. Call
# {result#result_code}[rdoc-ref:Runnable#result_code] to get the
# result character string. Stores the result of the run if the run
# did not pass.
#
# source://minitest//lib/minitest.rb#663
2021-09-10 21:21:17 +01:00
def record(result); end
2023-12-14 15:34:15 +00:00
# Outputs the summary of the run.
#
# source://minitest//lib/minitest.rb#669
2021-09-10 21:21:17 +01:00
def report; end
2023-12-14 15:34:15 +00:00
# Starts reporting on the run.
#
# source://minitest//lib/minitest.rb#647
2021-09-10 21:21:17 +01:00
def start; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#679
2021-09-10 21:21:17 +01:00
def synchronize(&block); end
end
2023-12-14 15:34:15 +00:00
# Represents run failures.
#
# source://minitest//lib/minitest.rb#962
2021-09-10 21:21:17 +01:00
class Minitest::Assertion < ::Exception
# source://minitest//lib/minitest.rb#965
2021-09-10 21:21:17 +01:00
def error; end
2023-12-14 15:34:15 +00:00
# Where was this run before an assertion was raised?
#
# source://minitest//lib/minitest.rb#972
2021-09-10 21:21:17 +01:00
def location; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#980
2021-09-10 21:21:17 +01:00
def result_code; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#984
2021-09-10 21:21:17 +01:00
def result_label; end
end
# source://minitest//lib/minitest.rb#963
Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp)
2023-12-14 15:34:15 +00:00
# Minitest Assertions. All assertion methods accept a +msg+ which is
# printed if the assertion fails.
#
# Protocol: Nearly everything here boils up to +assert+, which
# expects to be able to increment an instance accessor named
# +assertions+. This is not provided by Assertions and must be
# provided by the thing including Assertions. See Minitest::Runnable
# for an example.
#
# source://minitest//lib/minitest/assertions.rb#18
2021-09-10 21:21:17 +01:00
module Minitest::Assertions
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/assertions.rb#188
2021-09-10 21:21:17 +01:00
def _synchronize; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/assertions.rb#201
def _where; end
2023-12-14 15:34:15 +00:00
# Fails unless +test+ is truthy.
#
# source://minitest//lib/minitest/assertions.rb#178
2021-09-10 21:21:17 +01:00
def assert(test, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails unless +obj+ is empty.
#
# source://minitest//lib/minitest/assertions.rb#195
2021-09-10 21:21:17 +01:00
def assert_empty(obj, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails unless <tt>exp == act</tt> printing the difference between
# the two, if possible.
#
# If there is no visible difference but the assertion fails, you
# should suspect that your #== is buggy, or your inspect output is
# missing crucial details. For nicer structural diffing, set
# Minitest::Test.make_my_diffs_pretty!
#
# For floats use assert_in_delta.
#
# See also: Minitest::Assertions.diff
#
# source://minitest//lib/minitest/assertions.rb#221
2021-09-10 21:21:17 +01:00
def assert_equal(exp, act, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# For comparing Floats. Fails unless +exp+ and +act+ are within +delta+
# of each other.
#
# assert_in_delta Math::PI, (22.0 / 7.0), 0.01
#
# source://minitest//lib/minitest/assertions.rb#242
2021-09-10 21:21:17 +01:00
def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# For comparing Floats. Fails unless +exp+ and +act+ have a relative
# error less than +epsilon+.
#
# source://minitest//lib/minitest/assertions.rb#254
2021-09-10 21:21:17 +01:00
def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails unless +collection+ includes +obj+.
#
# source://minitest//lib/minitest/assertions.rb#261
2021-09-10 21:21:17 +01:00
def assert_includes(collection, obj, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails unless +obj+ is an instance of +cls+.
#
# source://minitest//lib/minitest/assertions.rb#272
2021-09-10 21:21:17 +01:00
def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails unless +obj+ is a kind of +cls+.
#
# source://minitest//lib/minitest/assertions.rb#283
2021-09-10 21:21:17 +01:00
def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails unless +matcher+ <tt>=~</tt> +obj+.
#
# source://minitest//lib/minitest/assertions.rb#293
2021-09-10 21:21:17 +01:00
def assert_match(matcher, obj, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails unless +obj+ is nil
#
# source://minitest//lib/minitest/assertions.rb#305
2021-09-10 21:21:17 +01:00
def assert_nil(obj, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# For testing with binary operators. Eg:
#
# assert_operator 5, :<=, 4
#
# source://minitest//lib/minitest/assertions.rb#315
2021-09-10 21:21:17 +01:00
def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if stdout or stderr do not output the expected results.
# Pass in nil if you don't care about that streams output. Pass in
# "" if you require it to be silent. Pass in a regexp if you want
# to pattern match.
#
# assert_output(/hey/) { method_with_output }
#
# NOTE: this uses #capture_io, not #capture_subprocess_io.
#
# See also: #assert_silent
#
# source://minitest//lib/minitest/assertions.rb#333
2021-09-10 21:21:17 +01:00
def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails unless +path+ exists.
#
# source://minitest//lib/minitest/assertions.rb#357
2021-09-10 21:21:17 +01:00
def assert_path_exists(path, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# For testing with pattern matching (only supported with Ruby 3.0 and later)
#
# # pass
# assert_pattern { [1,2,3] => [Integer, Integer, Integer] }
#
# # fail "length mismatch (given 3, expected 1)"
# assert_pattern { [1,2,3] => [Integer] }
#
# The bare <tt>=></tt> pattern will raise a NoMatchingPatternError on failure, which would
# normally be counted as a test error. This assertion rescues NoMatchingPatternError and
# generates a test failure. Any other exception will be raised as normal and generate a test
# error.
#
# @raise [NotImplementedError]
#
# source://minitest//lib/minitest/assertions.rb#376
def assert_pattern; end
2023-12-14 15:34:15 +00:00
# For testing with predicates. Eg:
#
# assert_predicate str, :empty?
#
# This is really meant for specs and is front-ended by assert_operator:
#
# str.must_be :empty?
#
# source://minitest//lib/minitest/assertions.rb#397
2021-09-10 21:21:17 +01:00
def assert_predicate(o1, op, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails unless the block raises one of +exp+. Returns the
# exception matched so you can check the message, attributes, etc.
#
# +exp+ takes an optional message on the end to help explain
# failures and defaults to StandardError if no exception class is
# passed. Eg:
#
# assert_raises(CustomError) { method_with_custom_error }
#
# With custom error message:
#
# assert_raises(CustomError, 'This should have raised CustomError') { method_with_custom_error }
#
# Using the returned object:
#
# error = assert_raises(CustomError) do
# raise CustomError, 'This is really bad'
# end
#
# assert_equal 'This is really bad', error.message
#
# source://minitest//lib/minitest/assertions.rb#424
2021-09-10 21:21:17 +01:00
def assert_raises(*exp); end
2023-12-14 15:34:15 +00:00
# Fails unless +obj+ responds to +meth+.
# include_all defaults to false to match Object#respond_to?
2023-12-14 15:34:15 +00:00
#
# source://minitest//lib/minitest/assertions.rb#456
def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails unless +exp+ and +act+ are #equal?
#
# source://minitest//lib/minitest/assertions.rb#466
2021-09-10 21:21:17 +01:00
def assert_same(exp, act, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# +send_ary+ is a receiver, message and arguments.
#
# Fails unless the call returns a true value
#
# source://minitest//lib/minitest/assertions.rb#479
2021-09-10 21:21:17 +01:00
def assert_send(send_ary, m = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if the block outputs anything to stderr or stdout.
#
# See also: #assert_output
#
# source://minitest//lib/minitest/assertions.rb#493
2021-09-10 21:21:17 +01:00
def assert_silent; end
2023-12-14 15:34:15 +00:00
# Fails unless the block throws +sym+
#
# source://minitest//lib/minitest/assertions.rb#502
2021-09-10 21:21:17 +01:00
def assert_throws(sym, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Captures $stdout and $stderr into strings:
#
# out, err = capture_io do
# puts "Some info"
# warn "You did a bad thing"
# end
#
# assert_match %r%info%, out
# assert_match %r%bad%, err
#
# NOTE: For efficiency, this method uses StringIO and does not
# capture IO for subprocesses. Use #capture_subprocess_io for
# that.
#
# source://minitest//lib/minitest/assertions.rb#543
2021-09-10 21:21:17 +01:00
def capture_io; end
2023-12-14 15:34:15 +00:00
# Captures $stdout and $stderr into strings, using Tempfile to
# ensure that subprocess IO is captured as well.
#
# out, err = capture_subprocess_io do
# system "echo Some info"
# system "echo You did a bad thing 1>&2"
# end
#
# assert_match %r%info%, out
# assert_match %r%bad%, err
#
# NOTE: This method is approximately 10x slower than #capture_io so
# only use it when you need to test the output of a subprocess.
#
# source://minitest//lib/minitest/assertions.rb#576
2021-09-10 21:21:17 +01:00
def capture_subprocess_io; end
2023-12-14 15:34:15 +00:00
# Returns a diff between +exp+ and +act+. If there is no known
# diff command or if it doesn't make sense to diff the output
# (single line, short output), then it simply returns a basic
# comparison between the two.
#
# See +things_to_diff+ for more info.
#
# source://minitest//lib/minitest/assertions.rb#59
2021-09-10 21:21:17 +01:00
def diff(exp, act); end
2023-12-14 15:34:15 +00:00
# Returns details for exception +e+
#
# source://minitest//lib/minitest/assertions.rb#608
2021-09-10 21:21:17 +01:00
def exception_details(e, msg); end
2023-12-14 15:34:15 +00:00
# Fails after a given date (in the local time zone). This allows
# you to put time-bombs in your tests if you need to keep
# something around until a later date lest you forget about it.
#
# source://minitest//lib/minitest/assertions.rb#624
2021-09-10 21:21:17 +01:00
def fail_after(y, m, d, msg); end
2023-12-14 15:34:15 +00:00
# Fails with +msg+.
#
# source://minitest//lib/minitest/assertions.rb#631
2021-09-10 21:21:17 +01:00
def flunk(msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Returns a proc that will output +msg+ along with the default message.
#
# source://minitest//lib/minitest/assertions.rb#639
2021-09-10 21:21:17 +01:00
def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end
2023-12-14 15:34:15 +00:00
# This returns a human-readable version of +obj+. By default
# #inspect is called. You can override this to use #pretty_inspect
# if you want.
#
# See Minitest::Test.make_my_diffs_pretty!
#
# source://minitest//lib/minitest/assertions.rb#129
2021-09-10 21:21:17 +01:00
def mu_pp(obj); end
2023-12-14 15:34:15 +00:00
# This returns a diff-able more human-readable version of +obj+.
# This differs from the regular mu_pp because it expands escaped
# newlines and makes hex-values (like object_ids) generic. This
# uses mu_pp to do the first pass and then cleans it up.
#
# source://minitest//lib/minitest/assertions.rb#152
2021-09-10 21:21:17 +01:00
def mu_pp_for_diff(obj); end
2023-12-14 15:34:15 +00:00
# used for counting assertions
#
# source://minitest//lib/minitest/assertions.rb#650
2021-09-10 21:21:17 +01:00
def pass(_msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if +test+ is truthy.
#
# source://minitest//lib/minitest/assertions.rb#657
2021-09-10 21:21:17 +01:00
def refute(test, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if +obj+ is empty.
#
# source://minitest//lib/minitest/assertions.rb#665
2021-09-10 21:21:17 +01:00
def refute_empty(obj, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if <tt>exp == act</tt>.
#
# For floats use refute_in_delta.
#
# source://minitest//lib/minitest/assertions.rb#676
2021-09-10 21:21:17 +01:00
def refute_equal(exp, act, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# For comparing Floats. Fails if +exp+ is within +delta+ of +act+.
#
# refute_in_delta Math::PI, (22.0 / 7.0)
#
# source://minitest//lib/minitest/assertions.rb#688
2021-09-10 21:21:17 +01:00
def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# For comparing Floats. Fails if +exp+ and +act+ have a relative error
# less than +epsilon+.
#
# source://minitest//lib/minitest/assertions.rb#700
2021-09-10 21:21:17 +01:00
def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if +collection+ includes +obj+.
#
# source://minitest//lib/minitest/assertions.rb#707
2021-09-10 21:21:17 +01:00
def refute_includes(collection, obj, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if +obj+ is an instance of +cls+.
#
# source://minitest//lib/minitest/assertions.rb#718
2021-09-10 21:21:17 +01:00
def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if +obj+ is a kind of +cls+.
#
# source://minitest//lib/minitest/assertions.rb#728
2021-09-10 21:21:17 +01:00
def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if +matcher+ <tt>=~</tt> +obj+.
#
# source://minitest//lib/minitest/assertions.rb#736
2021-09-10 21:21:17 +01:00
def refute_match(matcher, obj, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if +obj+ is nil.
#
# source://minitest//lib/minitest/assertions.rb#746
2021-09-10 21:21:17 +01:00
def refute_nil(obj, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if +o1+ is not +op+ +o2+. Eg:
#
# refute_operator 1, :>, 2 #=> pass
# refute_operator 1, :<, 2 #=> fail
#
# source://minitest//lib/minitest/assertions.rb#781
2021-09-10 21:21:17 +01:00
def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if +path+ exists.
#
# source://minitest//lib/minitest/assertions.rb#790
2021-09-10 21:21:17 +01:00
def refute_path_exists(path, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# For testing with pattern matching (only supported with Ruby 3.0 and later)
#
# # pass
# refute_pattern { [1,2,3] => [String] }
#
# # fail "NoMatchingPatternError expected, but nothing was raised."
# refute_pattern { [1,2,3] => [Integer, Integer, Integer] }
#
# This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any
# other exceptions will be raised as normal and generate a test error.
#
# @raise [NotImplementedError]
#
# source://minitest//lib/minitest/assertions.rb#763
def refute_pattern; end
2023-12-14 15:34:15 +00:00
# For testing with predicates.
#
# refute_predicate str, :empty?
#
# This is really meant for specs and is front-ended by refute_operator:
#
# str.wont_be :empty?
#
# source://minitest//lib/minitest/assertions.rb#804
2021-09-10 21:21:17 +01:00
def refute_predicate(o1, op, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if +obj+ responds to the message +meth+.
# include_all defaults to false to match Object#respond_to?
2023-12-14 15:34:15 +00:00
#
# source://minitest//lib/minitest/assertions.rb#813
def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Fails if +exp+ is the same (by object identity) as +act+.
#
# source://minitest//lib/minitest/assertions.rb#822
2021-09-10 21:21:17 +01:00
def refute_same(exp, act, msg = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Skips the current run. If run in verbose-mode, the skipped run
# gets listed at the end of the run but doesn't cause a failure
# exit code.
#
# @raise [Minitest::Skip]
#
# source://minitest//lib/minitest/assertions.rb#835
def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Skips the current run until a given date (in the local time
# zone). This allows you to put some fixes on hold until a later
# date, but still holds you accountable and prevents you from
# forgetting it.
#
# source://minitest//lib/minitest/assertions.rb#847
2021-09-10 21:21:17 +01:00
def skip_until(y, m, d, msg); end
2023-12-14 15:34:15 +00:00
# Was this testcase skipped? Meant for #teardown.
#
# @return [Boolean]
#
# source://minitest//lib/minitest/assertions.rb#856
2021-09-10 21:21:17 +01:00
def skipped?; end
2023-12-14 15:34:15 +00:00
# Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff.
#
# Criterion:
#
# 1. Strings include newlines or escaped newlines, but not both.
# 2. or: String lengths are > 30 characters.
# 3. or: Strings are equal to each other (but maybe different encodings?).
# 4. and: we found a diff executable.
#
# source://minitest//lib/minitest/assertions.rb#104
2021-09-10 21:21:17 +01:00
def things_to_diff(exp, act); end
class << self
2023-12-14 15:34:15 +00:00
# Returns the diff command to use in #diff. Tries to intelligently
# figure out what diff to use.
#
# source://minitest//lib/minitest/assertions.rb#29
2021-09-10 21:21:17 +01:00
def diff; end
2023-12-14 15:34:15 +00:00
# Set the diff command to use in #diff.
#
# source://minitest//lib/minitest/assertions.rb#47
2021-09-10 21:21:17 +01:00
def diff=(o); end
end
end
# source://minitest//lib/minitest/assertions.rb#206
2021-09-10 21:21:17 +01:00
Minitest::Assertions::E = T.let(T.unsafe(nil), String)
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/assertions.rb#19
2021-09-10 21:21:17 +01:00
Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object)
2023-12-14 15:34:15 +00:00
# The standard backtrace filter for minitest.
#
# See Minitest.backtrace_filter=.
#
# source://minitest//lib/minitest.rb#1108
2021-09-10 21:21:17 +01:00
class Minitest::BacktraceFilter
# @return [BacktraceFilter] a new instance of BacktraceFilter
#
# source://minitest//lib/minitest.rb#1114
def initialize(regexp = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Filter +bt+ to something useful. Returns the whole thing if
# $DEBUG (ruby) or $MT_DEBUG (env).
#
# source://minitest//lib/minitest.rb#1122
2021-09-10 21:21:17 +01:00
def filter(bt); end
# Returns the value of attribute regexp.
#
# source://minitest//lib/minitest.rb#1112
def regexp; end
# Sets the attribute regexp
#
# @param value the value to set the attribute regexp to.
#
# source://minitest//lib/minitest.rb#1112
def regexp=(_arg0); end
2021-09-10 21:21:17 +01:00
end
# source://minitest//lib/minitest.rb#1110
2021-09-10 21:21:17 +01:00
Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp)
2023-12-14 15:34:15 +00:00
# Dispatch to multiple reporters as one.
#
# source://minitest//lib/minitest.rb#913
2021-09-10 21:21:17 +01:00
class Minitest::CompositeReporter < ::Minitest::AbstractReporter
2023-12-14 15:34:15 +00:00
# @return [CompositeReporter] a new instance of CompositeReporter
#
# source://minitest//lib/minitest.rb#917
2021-09-10 21:21:17 +01:00
def initialize(*reporters); end
2023-12-14 15:34:15 +00:00
# Add another reporter to the mix.
#
# source://minitest//lib/minitest.rb#929
2021-09-10 21:21:17 +01:00
def <<(reporter); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#922
2021-09-10 21:21:17 +01:00
def io; end
2023-12-14 15:34:15 +00:00
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#933
2021-09-10 21:21:17 +01:00
def passed?; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#941
2021-09-10 21:21:17 +01:00
def prerecord(klass, name); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#948
2021-09-10 21:21:17 +01:00
def record(result); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#954
2021-09-10 21:21:17 +01:00
def report; end
2023-12-14 15:34:15 +00:00
# The list of reporters to dispatch to.
#
# source://minitest//lib/minitest.rb#915
2021-09-10 21:21:17 +01:00
def reporters; end
2023-12-14 15:34:15 +00:00
# The list of reporters to dispatch to.
#
# source://minitest//lib/minitest.rb#915
2021-09-10 21:21:17 +01:00
def reporters=(_arg0); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#937
2021-09-10 21:21:17 +01:00
def start; end
end
# Compresses backtraces.
#
# source://minitest//lib/minitest/compress.rb#5
module Minitest::Compress
# Takes a backtrace (array of strings) and compresses repeating
# cycles in it to make it more readable.
#
# source://minitest//lib/minitest/compress.rb#11
def compress(orig); end
end
2023-12-14 15:34:15 +00:00
# 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
# can use them inside or outside of the test methods.
#
# def test_something_for_mri
# skip "bug 1234" if jruby?
# # ...
# end
#
# if windows? then
# # ... lots of test methods ...
# end
#
# source://minitest//lib/minitest.rb#1052
2021-09-10 21:21:17 +01:00
module Minitest::Guard
2023-12-14 15:34:15 +00:00
# Is this running on jruby?
#
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#1057
2021-09-10 21:21:17 +01:00
def jruby?(platform = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Is this running on maglev?
#
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#1064
2021-09-10 21:21:17 +01:00
def maglev?(platform = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Is this running on mri?
#
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#1074
2021-09-10 21:21:17 +01:00
def mri?(platform = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Is this running on macOS?
#
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#1081
2021-09-10 21:21:17 +01:00
def osx?(platform = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Is this running on rubinius?
#
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#1088
2021-09-10 21:21:17 +01:00
def rubinius?(platform = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Is this running on windows?
#
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#1098
2021-09-10 21:21:17 +01:00
def windows?(platform = T.unsafe(nil)); end
end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/parallel.rb#2
2021-09-10 21:21:17 +01:00
module Minitest::Parallel; end
2023-12-14 15:34:15 +00:00
# The engine used to run multiple tests in parallel.
#
# source://minitest//lib/minitest/parallel.rb#7
2021-09-10 21:21:17 +01:00
class Minitest::Parallel::Executor
2023-12-14 15:34:15 +00:00
# Create a parallel test executor of with +size+ workers.
#
# @return [Executor] a new instance of Executor
#
# source://minitest//lib/minitest/parallel.rb#17
2021-09-10 21:21:17 +01:00
def initialize(size); end
2023-12-14 15:34:15 +00:00
# Add a job to the queue
#
# source://minitest//lib/minitest/parallel.rb#43
2021-09-10 21:21:17 +01:00
def <<(work); end
2023-12-14 15:34:15 +00:00
# Shuts down the pool of workers by signalling them to quit and
# waiting for them all to finish what they're currently working
# on.
#
# source://minitest//lib/minitest/parallel.rb#50
2021-09-10 21:21:17 +01:00
def shutdown; end
2023-12-14 15:34:15 +00:00
# The size of the pool of workers.
#
# source://minitest//lib/minitest/parallel.rb#12
2021-09-10 21:21:17 +01:00
def size; end
2023-12-14 15:34:15 +00:00
# Start the executor
#
# source://minitest//lib/minitest/parallel.rb#26
2021-09-10 21:21:17 +01:00
def start; end
end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/parallel.rb#56
2021-09-10 21:21:17 +01:00
module Minitest::Parallel::Test
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/parallel.rb#57
2021-09-10 21:21:17 +01:00
def _synchronize; end
end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/parallel.rb#59
2021-09-10 21:21:17 +01:00
module Minitest::Parallel::Test::ClassMethods
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/parallel.rb#60
2021-09-10 21:21:17 +01:00
def run_one_method(klass, method_name, reporter); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/parallel.rb#64
2021-09-10 21:21:17 +01:00
def test_order; end
end
2023-12-14 15:34:15 +00:00
# A very simple reporter that prints the "dots" during the run.
#
# This is added to the top-level CompositeReporter at the start of
# the run. If you want to change the output of minitest via a
# plugin, pull this out of the composite and replace it with your
# own.
#
# source://minitest//lib/minitest.rb#710
2021-09-10 21:21:17 +01:00
class Minitest::ProgressReporter < ::Minitest::Reporter
# source://minitest//lib/minitest.rb#711
2021-09-10 21:21:17 +01:00
def prerecord(klass, name); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#718
2021-09-10 21:21:17 +01:00
def record(result); end
end
2023-12-14 15:34:15 +00:00
# Shared code for anything that can get passed to a Reporter. See
# Minitest::Test & Minitest::Result.
#
# source://minitest//lib/minitest.rb#532
2021-09-10 21:21:17 +01:00
module Minitest::Reportable
2023-12-14 15:34:15 +00:00
# @raise [NotImplementedError]
#
# source://minitest//lib/minitest.rb#554
2021-09-10 21:21:17 +01:00
def class_name; end
2023-12-14 15:34:15 +00:00
# Did this run error?
#
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#575
2021-09-10 21:21:17 +01:00
def error?; end
2023-12-14 15:34:15 +00:00
# The location identifier of this test. Depends on a method
# existing called class_name.
#
# source://minitest//lib/minitest.rb#549
2021-09-10 21:21:17 +01:00
def location; end
2023-12-14 15:34:15 +00:00
# Did this run pass?
#
# Note: skipped runs are not considered passing, but they don't
# cause the process to exit non-zero.
#
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#539
2021-09-10 21:21:17 +01:00
def passed?; end
2023-12-14 15:34:15 +00:00
# Returns ".", "F", or "E" based on the result of the run.
#
# source://minitest//lib/minitest.rb#561
2021-09-10 21:21:17 +01:00
def result_code; end
2023-12-14 15:34:15 +00:00
# Was this run skipped?
#
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#568
2021-09-10 21:21:17 +01:00
def skipped?; end
end
# source://minitest//lib/minitest.rb#543
Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String)
# source://minitest//lib/minitest.rb#686
2021-09-10 21:21:17 +01:00
class Minitest::Reporter < ::Minitest::AbstractReporter
2023-12-14 15:34:15 +00:00
# @return [Reporter] a new instance of Reporter
#
# source://minitest//lib/minitest.rb#695
2021-09-10 21:21:17 +01:00
def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# The IO used to report.
#
# source://minitest//lib/minitest.rb#688
2021-09-10 21:21:17 +01:00
def io; end
2023-12-14 15:34:15 +00:00
# The IO used to report.
#
# source://minitest//lib/minitest.rb#688
2021-09-10 21:21:17 +01:00
def io=(_arg0); end
2023-12-14 15:34:15 +00:00
# Command-line options for this run.
#
# source://minitest//lib/minitest.rb#693
2021-09-10 21:21:17 +01:00
def options; end
2023-12-14 15:34:15 +00:00
# Command-line options for this run.
#
# source://minitest//lib/minitest.rb#693
2021-09-10 21:21:17 +01:00
def options=(_arg0); end
end
2023-12-14 15:34:15 +00:00
# This represents a test result in a clean way that can be
# marshalled over a wire. Tests can do anything they want to the
# test instance and can create conditions that cause Marshal.dump to
# blow up. By using Result.from(a_test) you can be reasonably sure
# that the test result can be marshalled.
#
# source://minitest//lib/minitest.rb#587
2021-09-10 21:21:17 +01:00
class Minitest::Result < ::Minitest::Runnable
include ::Minitest::Reportable
# source://minitest//lib/minitest.rb#621
2021-09-10 21:21:17 +01:00
def class_name; end
2023-12-14 15:34:15 +00:00
# The class name of the test result.
#
# source://minitest//lib/minitest.rb#596
2021-09-10 21:21:17 +01:00
def klass; end
2023-12-14 15:34:15 +00:00
# The class name of the test result.
#
# source://minitest//lib/minitest.rb#596
2021-09-10 21:21:17 +01:00
def klass=(_arg0); end
2023-12-14 15:34:15 +00:00
# The location of the test method.
#
# source://minitest//lib/minitest.rb#601
2021-09-10 21:21:17 +01:00
def source_location; end
2023-12-14 15:34:15 +00:00
# The location of the test method.
#
# source://minitest//lib/minitest.rb#601
2021-09-10 21:21:17 +01:00
def source_location=(_arg0); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#625
2021-09-10 21:21:17 +01:00
def to_s; end
class << self
2023-12-14 15:34:15 +00:00
# Create a new test result from a Runnable instance.
#
# source://minitest//lib/minitest.rb#606
2021-09-10 21:21:17 +01:00
def from(runnable); end
end
end
2023-12-14 15:34:15 +00:00
# re-open
#
# source://minitest//lib/minitest.rb#305
2021-09-10 21:21:17 +01:00
class Minitest::Runnable
2023-12-14 15:34:15 +00:00
# @return [Runnable] a new instance of Runnable
#
# source://minitest//lib/minitest.rb#463
2021-09-10 21:21:17 +01:00
def initialize(name); end
2023-12-14 15:34:15 +00:00
# Number of assertions executed in this run.
#
# source://minitest//lib/minitest.rb#309
2021-09-10 21:21:17 +01:00
def assertions; end
2023-12-14 15:34:15 +00:00
# Number of assertions executed in this run.
#
# source://minitest//lib/minitest.rb#309
2021-09-10 21:21:17 +01:00
def assertions=(_arg0); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#459
2021-09-10 21:21:17 +01:00
def failure; end
2023-12-14 15:34:15 +00:00
# An assertion raised during the run, if any.
#
# source://minitest//lib/minitest.rb#314
2021-09-10 21:21:17 +01:00
def failures; end
2023-12-14 15:34:15 +00:00
# An assertion raised during the run, if any.
#
# source://minitest//lib/minitest.rb#314
2021-09-10 21:21:17 +01:00
def failures=(_arg0); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#445
2021-09-10 21:21:17 +01:00
def marshal_dump; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#455
2021-09-10 21:21:17 +01:00
def marshal_load(ary); end
2023-12-14 15:34:15 +00:00
# Metadata you attach to the test results that get sent to the reporter.
#
# Lazily initializes to a hash, to keep memory down.
#
# NOTE: this data *must* be plain (read: marshal-able) data!
# Hashes! Arrays! Strings!
#
# source://minitest//lib/minitest.rb#478
def metadata; end
2023-12-14 15:34:15 +00:00
# Sets metadata, mainly used for +Result.from+.
#
# source://minitest//lib/minitest.rb#485
def metadata=(_arg0); end
2023-12-14 15:34:15 +00:00
# Returns true if metadata exists.
#
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#490
def metadata?; end
2023-12-14 15:34:15 +00:00
# Name of the run.
#
# source://minitest//lib/minitest.rb#332
2021-09-10 21:21:17 +01:00
def name; end
2023-12-14 15:34:15 +00:00
# Set the name of the run.
#
# source://minitest//lib/minitest.rb#339
2021-09-10 21:21:17 +01:00
def name=(o); end
2023-12-14 15:34:15 +00:00
# Did this run pass?
#
# Note: skipped runs are not considered passing, but they don't
# cause the process to exit non-zero.
#
# @raise [NotImplementedError]
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#507
2021-09-10 21:21:17 +01:00
def passed?; end
2023-12-14 15:34:15 +00:00
# Returns a single character string to print based on the result
# of the run. One of <tt>"."</tt>, <tt>"F"</tt>,
# <tt>"E"</tt> or <tt>"S"</tt>.
#
# @raise [NotImplementedError]
#
# source://minitest//lib/minitest.rb#516
2021-09-10 21:21:17 +01:00
def result_code; end
2023-12-14 15:34:15 +00:00
# Runs a single method. Needs to return self.
#
# @raise [NotImplementedError]
#
# source://minitest//lib/minitest.rb#497
2021-09-10 21:21:17 +01:00
def run; end
2023-12-14 15:34:15 +00:00
# Was this run skipped? See #passed? for more information.
#
# @raise [NotImplementedError]
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#523
2021-09-10 21:21:17 +01:00
def skipped?; end
2023-12-14 15:34:15 +00:00
# The time it took to run.
#
# source://minitest//lib/minitest.rb#319
2021-09-10 21:21:17 +01:00
def time; end
2023-12-14 15:34:15 +00:00
# The time it took to run.
#
# source://minitest//lib/minitest.rb#319
2021-09-10 21:21:17 +01:00
def time=(_arg0); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#321
2021-09-10 21:21:17 +01:00
def time_it; end
class << self
# source://minitest//lib/minitest.rb#1156
2021-09-10 21:21:17 +01:00
def inherited(klass); end
2023-12-14 15:34:15 +00:00
# Returns all instance methods matching the pattern +re+.
#
# source://minitest//lib/minitest.rb#346
2021-09-10 21:21:17 +01:00
def methods_matching(re); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#415
2021-09-10 21:21:17 +01:00
def on_signal(name, action); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#350
2021-09-10 21:21:17 +01:00
def reset; end
2023-12-14 15:34:15 +00:00
# Responsible for running all runnable methods in a given class,
# each in its own instance. Each instance is passed to the
# reporter to record.
#
# source://minitest//lib/minitest.rb#361
2021-09-10 21:21:17 +01:00
def run(reporter, options = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Runs a single method and has the reporter record the result.
# This was considered internal API but is factored out of run so
# that subclasses can specialize the running of an individual
# test. See Minitest::ParallelTest::ClassMethods for an example.
#
# source://minitest//lib/minitest.rb#387
2021-09-10 21:21:17 +01:00
def run_one_method(klass, method_name, reporter); end
2023-12-14 15:34:15 +00:00
# Each subclass of Runnable is responsible for overriding this
# method to return all runnable methods. See #methods_matching.
#
# @raise [NotImplementedError]
#
# source://minitest//lib/minitest.rb#432
2021-09-10 21:21:17 +01:00
def runnable_methods; end
2023-12-14 15:34:15 +00:00
# Returns all subclasses of Runnable.
#
# source://minitest//lib/minitest.rb#439
2021-09-10 21:21:17 +01:00
def runnables; end
2023-12-14 15:34:15 +00:00
# Defines the order to run tests (:random by default). Override
# this or use a convenience method to change it for your tests.
#
# source://minitest//lib/minitest.rb#396
def test_order; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#400
2021-09-10 21:21:17 +01:00
def with_info_handler(reporter, &block); end
end
end
# source://minitest//lib/minitest.rb#413
2021-09-10 21:21:17 +01:00
Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash)
2023-12-14 15:34:15 +00:00
# Assertion raised when skipping a run.
#
# source://minitest//lib/minitest.rb#992
2021-09-10 21:21:17 +01:00
class Minitest::Skip < ::Minitest::Assertion
# source://minitest//lib/minitest.rb#993
2021-09-10 21:21:17 +01:00
def result_label; end
end
2023-12-14 15:34:15 +00:00
# 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.
#
# If you want to create an entirely different type of output (eg,
# CI, HTML, etc), this is the place to start.
#
# Example:
#
# class JenkinsCIReporter < StatisticsReporter
# def report
# super # Needed to calculate some statistics
#
# print "<testsuite "
# print "tests='#{count}' "
# print "failures='#{failures}' "
# # Remaining XML...
# end
# end
#
# source://minitest//lib/minitest.rb#748
2021-09-10 21:21:17 +01:00
class Minitest::StatisticsReporter < ::Minitest::Reporter
2023-12-14 15:34:15 +00:00
# @return [StatisticsReporter] a new instance of StatisticsReporter
#
# source://minitest//lib/minitest.rb#790
2021-09-10 21:21:17 +01:00
def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Total number of assertions.
#
# source://minitest//lib/minitest.rb#750
2021-09-10 21:21:17 +01:00
def assertions; end
2023-12-14 15:34:15 +00:00
# Total number of assertions.
#
# source://minitest//lib/minitest.rb#750
2021-09-10 21:21:17 +01:00
def assertions=(_arg0); end
2023-12-14 15:34:15 +00:00
# Total number of test cases.
#
# source://minitest//lib/minitest.rb#755
2021-09-10 21:21:17 +01:00
def count; end
2023-12-14 15:34:15 +00:00
# Total number of test cases.
#
# source://minitest//lib/minitest.rb#755
2021-09-10 21:21:17 +01:00
def count=(_arg0); end
2023-12-14 15:34:15 +00:00
# Total number of tests that erred.
#
# source://minitest//lib/minitest.rb#783
2021-09-10 21:21:17 +01:00
def errors; end
2023-12-14 15:34:15 +00:00
# Total number of tests that erred.
#
# source://minitest//lib/minitest.rb#783
2021-09-10 21:21:17 +01:00
def errors=(_arg0); end
2023-12-14 15:34:15 +00:00
# Total number of tests that failed.
#
# source://minitest//lib/minitest.rb#778
2021-09-10 21:21:17 +01:00
def failures; end
2023-12-14 15:34:15 +00:00
# Total number of tests that failed.
#
# source://minitest//lib/minitest.rb#778
2021-09-10 21:21:17 +01:00
def failures=(_arg0); end
2023-12-14 15:34:15 +00:00
# @return [Boolean]
#
# source://minitest//lib/minitest.rb#803
2021-09-10 21:21:17 +01:00
def passed?; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#811
2021-09-10 21:21:17 +01:00
def record(result); end
2023-12-14 15:34:15 +00:00
# Report on the tracked statistics.
#
# source://minitest//lib/minitest.rb#821
2021-09-10 21:21:17 +01:00
def report; end
2023-12-14 15:34:15 +00:00
# An +Array+ of test cases that failed or were skipped.
#
# source://minitest//lib/minitest.rb#760
2021-09-10 21:21:17 +01:00
def results; end
2023-12-14 15:34:15 +00:00
# An +Array+ of test cases that failed or were skipped.
#
# source://minitest//lib/minitest.rb#760
2021-09-10 21:21:17 +01:00
def results=(_arg0); end
2023-12-14 15:34:15 +00:00
# Total number of tests that where skipped.
#
# source://minitest//lib/minitest.rb#788
2021-09-10 21:21:17 +01:00
def skips; end
2023-12-14 15:34:15 +00:00
# Total number of tests that where skipped.
#
# source://minitest//lib/minitest.rb#788
2021-09-10 21:21:17 +01:00
def skips=(_arg0); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#807
2021-09-10 21:21:17 +01:00
def start; end
2023-12-14 15:34:15 +00:00
# Time the test run started. If available, the monotonic clock is
# used and this is a +Float+, otherwise it's an instance of
# +Time+.
#
# source://minitest//lib/minitest.rb#767
2021-09-10 21:21:17 +01:00
def start_time; end
2023-12-14 15:34:15 +00:00
# Time the test run started. If available, the monotonic clock is
# used and this is a +Float+, otherwise it's an instance of
# +Time+.
#
# source://minitest//lib/minitest.rb#767
2021-09-10 21:21:17 +01:00
def start_time=(_arg0); end
2023-12-14 15:34:15 +00:00
# Test run time. If available, the monotonic clock is used and
# this is a +Float+, otherwise it's an instance of +Time+.
#
# source://minitest//lib/minitest.rb#773
2021-09-10 21:21:17 +01:00
def total_time; end
2023-12-14 15:34:15 +00:00
# Test run time. If available, the monotonic clock is used and
# this is a +Float+, otherwise it's an instance of +Time+.
#
# source://minitest//lib/minitest.rb#773
2021-09-10 21:21:17 +01:00
def total_time=(_arg0); end
end
2023-12-14 15:34:15 +00:00
# A reporter that prints the header, summary, and failure details at
# the end of the run.
#
# This is added to the top-level CompositeReporter at the start of
# the run. If you want to change the output of minitest via a
# plugin, pull this out of the composite and replace it with your
# own.
#
# source://minitest//lib/minitest.rb#842
2021-09-10 21:21:17 +01:00
class Minitest::SummaryReporter < ::Minitest::StatisticsReporter
# source://minitest//lib/minitest.rb#876
2021-09-10 21:21:17 +01:00
def aggregated_results(io); end
2023-12-14 15:34:15 +00:00
# Returns the value of attribute old_sync.
#
# source://minitest//lib/minitest.rb#844
2021-09-10 21:21:17 +01:00
def old_sync; end
2023-12-14 15:34:15 +00:00
# Sets the attribute old_sync
#
# @param value the value to set the attribute old_sync to.
#
# source://minitest//lib/minitest.rb#844
2021-09-10 21:21:17 +01:00
def old_sync=(_arg0); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#859
2021-09-10 21:21:17 +01:00
def report; end
2023-12-14 15:34:15 +00:00
# :startdoc:
#
# source://minitest//lib/minitest.rb#847
2021-09-10 21:21:17 +01:00
def start; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#871
2021-09-10 21:21:17 +01:00
def statistics; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#896
2021-09-10 21:21:17 +01:00
def summary; end
2023-12-14 15:34:15 +00:00
# :stopdoc:
#
# source://minitest//lib/minitest.rb#843
2021-09-10 21:21:17 +01:00
def sync; end
2023-12-14 15:34:15 +00:00
# :stopdoc:
#
# source://minitest//lib/minitest.rb#843
2021-09-10 21:21:17 +01:00
def sync=(_arg0); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#892
2021-09-10 21:21:17 +01:00
def to_s; end
end
2023-12-14 15:34:15 +00:00
# Subclass Test to create your own tests. Typically you'll want a
# Test subclass per implementation class.
#
# See Minitest::Assertions
#
# source://minitest//lib/minitest/test.rb#10
2021-09-10 21:21:17 +01:00
class Minitest::Test < ::Minitest::Runnable
include ::Minitest::Assertions
include ::Minitest::Reportable
include ::Minitest::Test::LifecycleHooks
include ::Minitest::Guard
extend ::Minitest::Guard
2023-12-14 15:34:15 +00:00
# LifecycleHooks
#
# source://minitest//lib/minitest/test.rb#190
2021-09-10 21:21:17 +01:00
def capture_exceptions; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/test.rb#15
2021-09-10 21:21:17 +01:00
def class_name; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/test.rb#207
2022-06-15 18:10:01 +00:00
def neuter_exception(e); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/test.rb#218
2022-07-04 18:10:47 +00:00
def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Runs a single test with setup/teardown hooks.
#
# source://minitest//lib/minitest/test.rb#86
2021-09-10 21:21:17 +01:00
def run; end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/test.rb#200
2021-12-15 18:12:40 +00:00
def sanitize_exception(e); end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/test.rb#232
2021-09-10 21:21:17 +01:00
def with_info_handler(&block); end
class << self
2023-12-14 15:34:15 +00:00
# Call this at the top of your tests when you absolutely
# positively need to have ordered tests. In doing so, you're
# admitting that you suck and your tests are weak.
#
# source://minitest//lib/minitest/test.rb#35
2021-09-10 21:21:17 +01:00
def i_suck_and_my_tests_are_order_dependent!; end
2023-12-14 15:34:15 +00:00
# Returns the value of attribute io_lock.
#
# source://minitest//lib/minitest/test.rb#26
2021-09-10 21:21:17 +01:00
def io_lock; end
2023-12-14 15:34:15 +00:00
# Sets the attribute io_lock
#
# @param value the value to set the attribute io_lock to.
#
# source://minitest//lib/minitest/test.rb#26
2021-09-10 21:21:17 +01:00
def io_lock=(_arg0); end
2023-12-14 15:34:15 +00:00
# Make diffs for this Test use #pretty_inspect so that diff
# in assert_equal can have more details. NOTE: this is much slower
# than the regular inspect but much more usable for complex
# objects.
#
# source://minitest//lib/minitest/test.rb#48
2021-09-10 21:21:17 +01:00
def make_my_diffs_pretty!; end
2023-12-14 15:34:15 +00:00
# Call this at the top of your tests when you want to run your
# tests in parallel. In doing so, you're admitting that you rule
# and your tests are awesome.
#
# source://minitest//lib/minitest/test.rb#59
2021-09-10 21:21:17 +01:00
def parallelize_me!; end
2023-12-14 15:34:15 +00:00
# Returns all instance methods starting with "test_". Based on
# #test_order, the methods are either sorted, randomized
# (default), or run in parallel.
#
# source://minitest//lib/minitest/test.rb#69
2021-09-10 21:21:17 +01:00
def runnable_methods; end
end
end
2023-12-14 15:34:15 +00:00
# Provides before/after hooks for setup and teardown. These are
# meant for library writers, NOT for regular test authors. See
# #before_setup for an example.
#
# source://minitest//lib/minitest/test.rb#113
2021-09-10 21:21:17 +01:00
module Minitest::Test::LifecycleHooks
2023-12-14 15:34:15 +00:00
# Runs before every test, after setup. This hook is meant for
# libraries to extend minitest. It is not meant to be used by
# test developers.
#
# See #before_setup for an example.
#
# source://minitest//lib/minitest/test.rb#163
2021-09-10 21:21:17 +01:00
def after_setup; end
2023-12-14 15:34:15 +00:00
# Runs after every test, after teardown. This hook is meant for
# libraries to extend minitest. It is not meant to be used by
# test developers.
#
# See #before_setup for an example.
#
# source://minitest//lib/minitest/test.rb#187
2021-09-10 21:21:17 +01:00
def after_teardown; end
2023-12-14 15:34:15 +00:00
# Runs before every test, before setup. This hook is meant for
# libraries to extend minitest. It is not meant to be used by
# test developers.
#
# As a simplistic example:
#
# module MyMinitestPlugin
# def before_setup
# super
# # ... stuff to do before setup is run
# end
#
# def after_setup
# # ... stuff to do after setup is run
# super
# end
#
# def before_teardown
# super
# # ... stuff to do before teardown is run
# end
#
# def after_teardown
# # ... stuff to do after teardown is run
# super
# end
# end
#
# class Minitest::Test
# include MyMinitestPlugin
# end
#
# source://minitest//lib/minitest/test.rb#148
2021-09-10 21:21:17 +01:00
def before_setup; end
2023-12-14 15:34:15 +00:00
# Runs after every test, before teardown. This hook is meant for
# libraries to extend minitest. It is not meant to be used by
# test developers.
#
# See #before_setup for an example.
#
# source://minitest//lib/minitest/test.rb#172
2021-09-10 21:21:17 +01:00
def before_teardown; end
2023-12-14 15:34:15 +00:00
# Runs before every test. Use this to set up before each test
# run.
#
# source://minitest//lib/minitest/test.rb#154
2021-09-10 21:21:17 +01:00
def setup; end
2023-12-14 15:34:15 +00:00
# Runs after every test. Use this to clean up after each test
# run.
#
# source://minitest//lib/minitest/test.rb#178
2021-09-10 21:21:17 +01:00
def teardown; end
end
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/test.rb#19
2021-09-10 21:21:17 +01:00
Minitest::Test::PASSTHROUGH_EXCEPTIONS = T.let(T.unsafe(nil), Array)
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/test.rb#21
Minitest::Test::SETUP_METHODS = T.let(T.unsafe(nil), Array)
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest/test.rb#23
2021-09-10 21:21:17 +01:00
Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array)
2023-12-14 15:34:15 +00:00
# Assertion wrapping an unexpected error that was raised during a run.
#
# source://minitest//lib/minitest.rb#1001
2021-09-10 21:21:17 +01:00
class Minitest::UnexpectedError < ::Minitest::Assertion
include ::Minitest::Compress
2023-12-14 15:34:15 +00:00
# @return [UnexpectedError] a new instance of UnexpectedError
#
# source://minitest//lib/minitest.rb#1007
2021-09-10 21:21:17 +01:00
def initialize(error); end
# source://minitest//lib/minitest.rb#1020
2021-09-10 21:21:17 +01:00
def backtrace; end
2023-12-14 15:34:15 +00:00
# TODO: figure out how to use `cause` instead
#
# source://minitest//lib/minitest.rb#1005
2021-09-10 21:21:17 +01:00
def error; end
2023-12-14 15:34:15 +00:00
# TODO: figure out how to use `cause` instead
#
# source://minitest//lib/minitest.rb#1005
2021-09-10 21:21:17 +01:00
def error=(_arg0); end
# source://minitest//lib/minitest.rb#1026
2023-12-14 15:34:15 +00:00
def message; end
2021-09-10 21:21:17 +01:00
# source://minitest//lib/minitest.rb#1032
2023-12-14 15:34:15 +00:00
def result_label; end
2021-09-10 21:21:17 +01:00
end
# source://minitest//lib/minitest.rb#1024
Minitest::UnexpectedError::BASE_RE = T.let(T.unsafe(nil), Regexp)
2023-12-14 15:34:15 +00:00
# source://minitest//lib/minitest.rb#12
2021-09-10 21:21:17 +01:00
Minitest::VERSION = T.let(T.unsafe(nil), String)