2021-11-03 18:11:18 +00:00
|
|
|
# typed: true
|
|
|
|
|
2020-08-22 16:06:04 +00:00
|
|
|
# DO NOT EDIT MANUALLY
|
2020-11-06 17:58:29 +11:00
|
|
|
# This is an autogenerated file for types exported from the `rspec-support` gem.
|
2021-09-17 19:28:50 +01:00
|
|
|
# Please instead update this file by running `bin/tapioca gem rspec-support`.
|
2020-08-22 16:06:04 +00:00
|
|
|
|
2024-12-03 19:04:50 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#3
|
2021-09-10 21:21:17 +01:00
|
|
|
module RSpec
|
|
|
|
extend ::RSpec::Support::Warnings
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Consistent implementation for "cleaning" the caller method to strip out
|
|
|
|
# non-rspec lines. This enables errors to be reported at the call site in
|
|
|
|
# the code using the library, which is far more useful than the particular
|
|
|
|
# internal method that raised an error.
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/caller_filter.rb#10
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::CallerFilter
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# Earlier rubies do not support the two argument form of `caller`. This
|
|
|
|
# fallback is logically the same, but slower.
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/caller_filter.rb#49
|
2021-09-10 21:21:17 +01:00
|
|
|
def first_non_rspec_line(skip_frames = T.unsafe(nil), increment = T.unsafe(nil)); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/caller_filter.rb#20
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::CallerFilter::ADDITIONAL_TOP_LEVEL_FILES = T.let(T.unsafe(nil), Array)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# rubygems/core_ext/kernel_require.rb isn't actually part of rspec (obviously) but we want
|
|
|
|
# it ignored when we are looking for the first meaningful line of the backtrace outside
|
|
|
|
# of RSpec. It can show up in the backtrace as the immediate first caller
|
|
|
|
# when `CallerFilter.first_non_rspec_line` is called from the top level of a required
|
|
|
|
# file, but it depends on if rubygems is loaded or not. We don't want to have to deal
|
|
|
|
# with this complexity in our `RSpec.deprecate` calls, so we ignore it here.
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/caller_filter.rb#30
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::CallerFilter::IGNORE_REGEX = T.let(T.unsafe(nil), Regexp)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/caller_filter.rb#22
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::CallerFilter::LIB_REGEX = T.let(T.unsafe(nil), Regexp)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/caller_filter.rb#11
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::CallerFilter::RSPEC_LIBS = T.let(T.unsafe(nil), Array)
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#4
|
2021-09-10 21:21:17 +01:00
|
|
|
module RSpec::Support
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# Used internally to get a class of a given object, even if it does not respond to #class.
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#86
|
2021-09-10 21:21:17 +01:00
|
|
|
def class_of(object); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Defines a helper method that is optimized to require files from the
|
|
|
|
# named lib. The passed block MUST be `{ |f| require_relative f }`
|
|
|
|
# because for `require_relative` to work properly from within the named
|
|
|
|
# lib the line of code must be IN that lib.
|
|
|
|
#
|
|
|
|
# `require_relative` is preferred when available because it is always O(1),
|
|
|
|
# regardless of the number of dirs in $LOAD_PATH. `require`, on the other
|
|
|
|
# hand, does a linear O(N) search over the dirs in the $LOAD_PATH until
|
|
|
|
# it can resolve the file relative to one of the dirs.
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#16
|
2021-09-10 21:21:17 +01:00
|
|
|
def define_optimized_require_for_rspec(lib, &require_relative); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Remove a previously registered matcher. Useful for cleaning up after
|
|
|
|
# yourself in specs.
|
|
|
|
#
|
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/matcher_definition.rb#24
|
2021-09-10 21:21:17 +01:00
|
|
|
def deregister_matcher_definition(&block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#113
|
2021-09-10 21:21:17 +01:00
|
|
|
def failure_notifier; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#105
|
2021-09-10 21:21:17 +01:00
|
|
|
def failure_notifier=(callable); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/matcher_definition.rb#29
|
2021-09-10 21:21:17 +01:00
|
|
|
def is_a_matcher?(object); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/matcher_definition.rb#6
|
2021-09-10 21:21:17 +01:00
|
|
|
def matcher_definitions; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#54
|
2021-09-10 21:21:17 +01:00
|
|
|
def method_handle_for(object, method_name); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#118
|
2021-09-10 21:21:17 +01:00
|
|
|
def notify_failure(failure, options = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Used internally to break cyclic dependency between mocks, expectations,
|
|
|
|
# and support. We don't currently have a consistent implementation of our
|
|
|
|
# matchers, though we are considering changing that:
|
|
|
|
# https://github.com/rspec/rspec-mocks/issues/513
|
|
|
|
#
|
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/matcher_definition.rb#16
|
2021-09-10 21:21:17 +01:00
|
|
|
def register_matcher_definition(&block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#25
|
2021-09-10 21:21:17 +01:00
|
|
|
def require_rspec_support(f); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# gives a string representation of an object for use in RSpec descriptions
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/matcher_definition.rb#36
|
2021-09-10 21:21:17 +01:00
|
|
|
def rspec_description_for_object(object); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#95
|
2021-09-10 21:21:17 +01:00
|
|
|
def thread_local_data; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#140
|
2021-09-10 21:21:17 +01:00
|
|
|
def warning_notifier; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#133
|
2021-09-10 21:21:17 +01:00
|
|
|
def warning_notifier=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#123
|
2021-09-10 21:21:17 +01:00
|
|
|
def with_failure_notifier(callable); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#145
|
2021-09-10 21:21:17 +01:00
|
|
|
module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue
|
|
|
|
class << self
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#150
|
2021-09-10 21:21:17 +01:00
|
|
|
def ===(exception); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# These exceptions are dangerous to rescue as rescuing them
|
|
|
|
# would interfere with things we should not interfere with.
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#148
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue::AVOID_RESCUING = T.let(T.unsafe(nil), Array)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Deals with the slightly different semantics of block arguments.
|
|
|
|
# For methods, arguments are required unless a default value is provided.
|
|
|
|
# For blocks, arguments are optional, even if no default value is provided.
|
|
|
|
#
|
|
|
|
# However, we want to treat block args as required since you virtually
|
|
|
|
# always want to pass a value for each received argument and our
|
|
|
|
# `and_yield` has treated block args as required for many years.
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#268
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::BlockSignature < ::RSpec::Support::MethodSignature
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#270
|
2021-09-10 21:21:17 +01:00
|
|
|
def classify_parameters; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/comparable_version.rb#6
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::ComparableVersion
|
|
|
|
include ::Comparable
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [ComparableVersion] a new instance of ComparableVersion
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/comparable_version.rb#11
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(string); end
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/comparable_version.rb#15
|
2021-09-10 21:21:17 +01:00
|
|
|
def <=>(other); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/comparable_version.rb#37
|
2021-09-10 21:21:17 +01:00
|
|
|
def segments; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the value of attribute string.
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/comparable_version.rb#9
|
2021-09-10 21:21:17 +01:00
|
|
|
def string; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#110
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::DEFAULT_FAILURE_NOTIFIER = T.let(T.unsafe(nil), Proc)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#137
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::DEFAULT_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc)
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#12
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::Differ
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [Differ] a new instance of Differ
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#69
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(opts = T.unsafe(nil)); end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#65
|
2021-09-10 21:21:17 +01:00
|
|
|
def color?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#13
|
2021-09-10 21:21:17 +01:00
|
|
|
def diff(actual, expected); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#59
|
2021-09-10 21:21:17 +01:00
|
|
|
def diff_as_object(actual, expected); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#30
|
2021-09-10 21:21:17 +01:00
|
|
|
def diff_as_string(actual, expected); end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#130
|
2021-09-10 21:21:17 +01:00
|
|
|
def add_old_hunk_to_hunk(hunk, oldhunk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#126
|
2021-09-10 21:21:17 +01:00
|
|
|
def add_to_output(output, string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#80
|
2021-09-10 21:21:17 +01:00
|
|
|
def all_strings?(*args); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#84
|
2021-09-10 21:21:17 +01:00
|
|
|
def any_multiline_strings?(*args); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#155
|
2021-09-10 21:21:17 +01:00
|
|
|
def blue(text); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#117
|
2021-09-10 21:21:17 +01:00
|
|
|
def build_hunks(actual, expected); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#92
|
2021-09-10 21:21:17 +01:00
|
|
|
def coerce_to_string(string_or_array); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#143
|
2021-09-10 21:21:17 +01:00
|
|
|
def color(text, color_code); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#163
|
2021-09-10 21:21:17 +01:00
|
|
|
def color_diff(diff); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#97
|
2021-09-10 21:21:17 +01:00
|
|
|
def diffably_stringify(array); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#121
|
2021-09-10 21:21:17 +01:00
|
|
|
def finalize_output(output, final_line); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#139
|
2021-09-10 21:21:17 +01:00
|
|
|
def format_type; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#151
|
2021-09-10 21:21:17 +01:00
|
|
|
def green(text); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#204
|
2021-09-10 21:21:17 +01:00
|
|
|
def handle_encoding_errors(actual, expected); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#194
|
2021-09-10 21:21:17 +01:00
|
|
|
def hash_to_string(hash); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#108
|
2021-09-10 21:21:17 +01:00
|
|
|
def multiline?(string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#88
|
2021-09-10 21:21:17 +01:00
|
|
|
def no_numbers?(*args); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#76
|
2021-09-10 21:21:17 +01:00
|
|
|
def no_procs?(*args); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#159
|
2021-09-10 21:21:17 +01:00
|
|
|
def normal(text); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#180
|
2021-09-10 21:21:17 +01:00
|
|
|
def object_to_string(object); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#147
|
2021-09-10 21:21:17 +01:00
|
|
|
def red(text); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/differ.rb#134
|
2021-09-10 21:21:17 +01:00
|
|
|
def safely_flatten(array); end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Replacement for fileutils#mkdir_p because we don't want to require parts
|
|
|
|
# of stdlib in RSpec.
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/directory_maker.rb#11
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::DirectoryMaker
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# Implements nested directory construction
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/directory_maker.rb#15
|
2021-09-10 21:21:17 +01:00
|
|
|
def mkdir_p(path); end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/directory_maker.rb#57
|
2021-09-10 21:21:17 +01:00
|
|
|
def directory_exists?(dirname); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/directory_maker.rb#52
|
2021-09-10 21:21:17 +01:00
|
|
|
def generate_path(stack, part); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/directory_maker.rb#49
|
2021-09-10 21:21:17 +01:00
|
|
|
def generate_stack(path); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#6
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::EncodedString
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [EncodedString] a new instance of EncodedString
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#16
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(string, encoding = T.unsafe(nil)); end
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#28
|
2021-09-10 21:21:17 +01:00
|
|
|
def <<(string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#25
|
2021-09-10 21:21:17 +01:00
|
|
|
def ==(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#25
|
2021-09-10 21:21:17 +01:00
|
|
|
def empty?(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#25
|
2021-09-10 21:21:17 +01:00
|
|
|
def encoding(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#25
|
2021-09-10 21:21:17 +01:00
|
|
|
def eql?(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#25
|
2021-09-10 21:21:17 +01:00
|
|
|
def lines(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the value of attribute source_encoding.
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#21
|
2021-09-10 21:21:17 +01:00
|
|
|
def source_encoding; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#41
|
2021-09-10 21:21:17 +01:00
|
|
|
def split(regex_or_string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#46
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_s; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2025-07-11 17:02:54 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#49
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_str; end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#139
|
2021-09-10 21:21:17 +01:00
|
|
|
def detect_source_encoding(string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Encoding Exceptions:
|
|
|
|
#
|
|
|
|
# Raised by Encoding and String methods:
|
|
|
|
# Encoding::UndefinedConversionError:
|
|
|
|
# when a transcoding operation fails
|
|
|
|
# if the String contains characters invalid for the target encoding
|
|
|
|
# e.g. "\x80".encode('UTF-8','ASCII-8BIT')
|
|
|
|
# vs "\x80".encode('UTF-8','ASCII-8BIT', undef: :replace, replace: '<undef>')
|
|
|
|
# # => '<undef>'
|
|
|
|
# Encoding::CompatibilityError
|
|
|
|
# when Encoding.compatible?(str1, str2) is nil
|
|
|
|
# e.g. utf_16le_emoji_string.split("\n")
|
|
|
|
# e.g. valid_unicode_string.encode(utf8_encoding) << ascii_string
|
|
|
|
# Encoding::InvalidByteSequenceError:
|
|
|
|
# when the string being transcoded contains a byte invalid for
|
|
|
|
# either the source or target encoding
|
|
|
|
# e.g. "\x80".encode('UTF-8','US-ASCII')
|
|
|
|
# vs "\x80".encode('UTF-8','US-ASCII', invalid: :replace, replace: '<byte>')
|
|
|
|
# # => '<byte>'
|
|
|
|
# ArgumentError
|
|
|
|
# when operating on a string with invalid bytes
|
|
|
|
# e.g."\x80".split("\n")
|
|
|
|
# TypeError
|
|
|
|
# when a symbol is passed as an encoding
|
|
|
|
# Encoding.find(:"UTF-8")
|
|
|
|
# when calling force_encoding on an object
|
|
|
|
# that doesn't respond to #to_str
|
|
|
|
#
|
|
|
|
# Raised by transcoding methods:
|
|
|
|
# Encoding::ConverterNotFoundError:
|
|
|
|
# when a named encoding does not correspond with a known converter
|
|
|
|
# e.g. 'abc'.force_encoding('UTF-8').encode('foo')
|
|
|
|
# or a converter path cannot be found
|
|
|
|
# e.g. "\x80".force_encoding('ASCII-8BIT').encode('Emacs-Mule')
|
|
|
|
#
|
|
|
|
# Raised by byte <-> char conversions
|
|
|
|
# RangeError: out of char range
|
|
|
|
# e.g. the UTF-16LE emoji: 128169.chr
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#93
|
2021-09-10 21:21:17 +01:00
|
|
|
def matching_encoding(string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# http://stackoverflow.com/a/8711118/879854
|
|
|
|
# Loop over chars in a string replacing chars
|
|
|
|
# with invalid encoding, which is a pretty good proxy
|
|
|
|
# for the invalid byte sequence that causes an ArgumentError
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#124
|
2021-09-10 21:21:17 +01:00
|
|
|
def remove_invalid_bytes(string); end
|
|
|
|
|
|
|
|
class << self
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#143
|
2021-09-10 21:21:17 +01:00
|
|
|
def pick_encoding(source_a, source_b); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Ruby's default replacement string is:
|
|
|
|
# U+FFFD ("\xEF\xBF\xBD"), for Unicode encoding forms, else
|
|
|
|
# ? ("\x3F")
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#14
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::EncodedString::REPLACE = T.let(T.unsafe(nil), String)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#9
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::EncodedString::US_ASCII = T.let(T.unsafe(nil), String)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Reduce allocations by storing constants.
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/encoded_string.rb#8
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Provides a means to fuzzy-match between two arbitrary objects.
|
|
|
|
# Understands array/hash nesting. Uses `===` or `==` to
|
|
|
|
# perform the matching.
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#8
|
2021-09-10 21:21:17 +01:00
|
|
|
module RSpec::Support::FuzzyMatcher
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#10
|
2021-09-10 21:21:17 +01:00
|
|
|
def values_match?(expected, actual); end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#29
|
2021-09-10 21:21:17 +01:00
|
|
|
def arrays_match?(expected_list, actual_list); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#38
|
2021-09-10 21:21:17 +01:00
|
|
|
def hashes_match?(expected_hash, actual_hash); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/hunk_generator.rb#9
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::HunkGenerator
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [HunkGenerator] a new instance of HunkGenerator
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/hunk_generator.rb#10
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(actual, expected); end
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/hunk_generator.rb#15
|
2021-09-10 21:21:17 +01:00
|
|
|
def hunks; end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/hunk_generator.rb#32
|
2021-09-10 21:21:17 +01:00
|
|
|
def actual_lines; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/hunk_generator.rb#36
|
2021-09-10 21:21:17 +01:00
|
|
|
def build_hunk(piece); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/hunk_generator.rb#44
|
2021-09-10 21:21:17 +01:00
|
|
|
def context_lines; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/hunk_generator.rb#24
|
2021-09-10 21:21:17 +01:00
|
|
|
def diffs; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/hunk_generator.rb#28
|
2021-09-10 21:21:17 +01:00
|
|
|
def expected_lines; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support.rb#40
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::KERNEL_METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Allows matchers to be used instead of providing keyword arguments. In
|
|
|
|
# practice, when this happens only the arity of the method is verified.
|
|
|
|
#
|
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#395
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::LooseSignatureVerifier < ::RSpec::Support::MethodSignatureVerifier
|
|
|
|
private
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#398
|
2021-09-10 21:21:17 +01:00
|
|
|
def split_args(*args); end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# If a matcher is used in a signature in place of keyword arguments, all
|
|
|
|
# keyword argument validation needs to be skipped since the matcher is
|
|
|
|
# opaque.
|
|
|
|
#
|
|
|
|
# Instead, keyword arguments will be validated when the method is called
|
|
|
|
# and they are actually known.
|
|
|
|
#
|
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#415
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [SignatureWithKeywordArgumentsMatcher] a new instance of SignatureWithKeywordArgumentsMatcher
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#416
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(signature); end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#436
|
2021-09-10 21:21:17 +01:00
|
|
|
def has_kw_args_in?(args); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#424
|
2021-09-10 21:21:17 +01:00
|
|
|
def invalid_kw_args_from(_kw_args); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#420
|
2021-09-10 21:21:17 +01:00
|
|
|
def missing_kw_args_from(_kw_args); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#428
|
2021-09-10 21:21:17 +01:00
|
|
|
def non_kw_args_arity_description; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#432
|
2021-09-10 21:21:17 +01:00
|
|
|
def valid_non_kw_args?(*args); end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Extracts info about the number of arguments and allowed/required
|
|
|
|
# keyword args of a given method.
|
|
|
|
#
|
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#13
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::MethodSignature
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [MethodSignature] a new instance of MethodSignature
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#16
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(method); end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#98
|
2021-09-10 21:21:17 +01:00
|
|
|
def arbitrary_kw_args?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#38
|
2021-09-10 21:21:17 +01:00
|
|
|
def classify_arity(arity = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#106
|
2021-09-10 21:21:17 +01:00
|
|
|
def classify_parameters; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Without considering what the last arg is, could it
|
|
|
|
# contain keyword arguments?
|
|
|
|
#
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#92
|
2021-09-10 21:21:17 +01:00
|
|
|
def could_contain_kw_args?(args); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#51
|
2021-09-10 21:21:17 +01:00
|
|
|
def description; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# If the last argument is Hash, Ruby will treat only symbol keys as keyword arguments
|
|
|
|
# the rest will be grouped in another Hash and passed as positional argument.
|
|
|
|
#
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#84
|
2021-09-10 21:21:17 +01:00
|
|
|
def has_kw_args_in?(args); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#77
|
2021-09-10 21:21:17 +01:00
|
|
|
def invalid_kw_args_from(given_kw_args); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14
|
2021-09-10 21:21:17 +01:00
|
|
|
def max_non_kw_args; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14
|
2021-09-10 21:21:17 +01:00
|
|
|
def min_non_kw_args; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#73
|
2021-09-10 21:21:17 +01:00
|
|
|
def missing_kw_args_from(given_kw_args); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#23
|
2021-09-10 21:21:17 +01:00
|
|
|
def non_kw_args_arity_description; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14
|
2021-09-10 21:21:17 +01:00
|
|
|
def optional_kw_args; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14
|
2021-09-10 21:21:17 +01:00
|
|
|
def required_kw_args; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#102
|
2021-09-10 21:21:17 +01:00
|
|
|
def unlimited_args?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#31
|
2021-09-10 21:21:17 +01:00
|
|
|
def valid_non_kw_args?(positional_arg_count, optional_max_arg_count = T.unsafe(nil)); end
|
|
|
|
end
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#162
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Encapsulates expectations about the number of arguments and
|
|
|
|
# allowed/required keyword args of a given method.
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#219
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::MethodSignatureExpectation
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [MethodSignatureExpectation] a new instance of MethodSignatureExpectation
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#220
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize; end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#247
|
2021-09-10 21:21:17 +01:00
|
|
|
def empty?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231
|
2021-09-10 21:21:17 +01:00
|
|
|
def expect_arbitrary_keywords; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231
|
2021-09-10 21:21:17 +01:00
|
|
|
def expect_arbitrary_keywords=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231
|
2021-09-10 21:21:17 +01:00
|
|
|
def expect_unlimited_arguments; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231
|
2021-09-10 21:21:17 +01:00
|
|
|
def expect_unlimited_arguments=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229
|
2021-09-10 21:21:17 +01:00
|
|
|
def keywords; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#254
|
2021-09-10 21:21:17 +01:00
|
|
|
def keywords=(values); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229
|
2021-09-10 21:21:17 +01:00
|
|
|
def max_count; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @raise [ArgumentError]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#233
|
2021-09-10 21:21:17 +01:00
|
|
|
def max_count=(number); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229
|
2021-09-10 21:21:17 +01:00
|
|
|
def min_count; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @raise [ArgumentError]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#240
|
2021-09-10 21:21:17 +01:00
|
|
|
def min_count=(number); end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Abstract base class for signature verifiers.
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#280
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::MethodSignatureVerifier
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [MethodSignatureVerifier] a new instance of MethodSignatureVerifier
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#283
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(signature, args = T.unsafe(nil)); end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#326
|
2021-09-10 21:21:17 +01:00
|
|
|
def error_message; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281
|
2021-09-10 21:21:17 +01:00
|
|
|
def kw_args; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281
|
2021-09-10 21:21:17 +01:00
|
|
|
def max_non_kw_args; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281
|
2021-09-10 21:21:17 +01:00
|
|
|
def min_non_kw_args; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281
|
2021-09-10 21:21:17 +01:00
|
|
|
def non_kw_args; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#318
|
2021-09-10 21:21:17 +01:00
|
|
|
def valid?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#290
|
2021-09-10 21:21:17 +01:00
|
|
|
def with_expectation(expectation); end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#357
|
2021-09-10 21:21:17 +01:00
|
|
|
def arbitrary_kw_args?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#353
|
2021-09-10 21:21:17 +01:00
|
|
|
def invalid_kw_args; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#349
|
2021-09-10 21:21:17 +01:00
|
|
|
def missing_kw_args; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#365
|
2021-09-10 21:21:17 +01:00
|
|
|
def split_args(*args); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#361
|
2021-09-10 21:21:17 +01:00
|
|
|
def unlimited_args?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#345
|
2021-09-10 21:21:17 +01:00
|
|
|
def valid_non_kw_args?; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# On 1.9 and up, this is in core, so we just use the real one
|
|
|
|
#
|
2024-12-03 19:04:50 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#65
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::Mutex < ::Thread::Mutex
|
|
|
|
class << self
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#70
|
2021-09-10 21:21:17 +01:00
|
|
|
def new; end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# If you mock Mutex.new you break our usage of Mutex, so
|
2024-02-05 18:38:20 +00:00
|
|
|
# instead we capture the original method to return Mutexes.
|
2023-12-14 15:34:15 +00:00
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#68
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::Mutex::NEW_MUTEX_METHOD = T.let(T.unsafe(nil), Method)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Provides query methods for different OS or OS features.
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#11
|
2021-09-10 21:21:17 +01:00
|
|
|
module RSpec::Support::OS
|
|
|
|
private
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#14
|
2021-09-10 21:21:17 +01:00
|
|
|
def windows?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#18
|
2021-09-10 21:21:17 +01:00
|
|
|
def windows_file_path?; end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#14
|
2021-09-10 21:21:17 +01:00
|
|
|
def windows?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#18
|
2021-09-10 21:21:17 +01:00
|
|
|
def windows_file_path?; end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Provide additional output details beyond what `inspect` provides when
|
|
|
|
# printing Time, DateTime, or BigDecimal
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#10
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::ObjectFormatter
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [ObjectFormatter] a new instance of ObjectFormatter
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#29
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(max_formatted_output_length = T.unsafe(nil)); end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#34
|
2021-09-10 21:21:17 +01:00
|
|
|
def format(object); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#13
|
2021-09-10 21:21:17 +01:00
|
|
|
def max_formatted_output_length; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#13
|
2021-09-10 21:21:17 +01:00
|
|
|
def max_formatted_output_length=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#72
|
2021-09-10 21:21:17 +01:00
|
|
|
def prepare_array(array); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#96
|
2021-09-10 21:21:17 +01:00
|
|
|
def prepare_element(element); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Prepares the provided object to be formatted by wrapping it as needed
|
|
|
|
# in something that, when `inspect` is called on it, will produce the
|
|
|
|
# desired output.
|
|
|
|
#
|
|
|
|
# This allows us to apply the desired formatting to hash/array data structures
|
|
|
|
# at any level of nesting, simply by walking that structure and replacing items
|
|
|
|
# with custom items that have `inspect` defined to return the desired output
|
|
|
|
# for that item. Then we can just use `Array#inspect` or `Hash#inspect` to
|
|
|
|
# format the entire thing.
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#58
|
2021-09-10 21:21:17 +01:00
|
|
|
def prepare_for_inspection(object); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#78
|
2021-09-10 21:21:17 +01:00
|
|
|
def prepare_hash(input_hash); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#115
|
2021-09-10 21:21:17 +01:00
|
|
|
def recursive_structure?(object); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#88
|
2021-09-10 21:21:17 +01:00
|
|
|
def sort_hash_keys(input_hash); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#108
|
2021-09-10 21:21:17 +01:00
|
|
|
def with_entering_structure(structure); end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Returns the substring defined by the start_index and end_index
|
|
|
|
# If the string ends with a partial ANSI code code then that
|
|
|
|
# will be removed as printing partial ANSI
|
|
|
|
# codes to the terminal can lead to corruption
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#270
|
2021-09-10 21:21:17 +01:00
|
|
|
def truncate_string(str, start_index, end_index); end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# Methods are deferred to a default instance of the class to maintain the interface
|
|
|
|
# For example, calling ObjectFormatter.format is still possible
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#17
|
2021-09-10 21:21:17 +01:00
|
|
|
def default_instance; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#21
|
2021-09-10 21:21:17 +01:00
|
|
|
def format(object); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#25
|
2021-09-10 21:21:17 +01:00
|
|
|
def prepare_for_inspection(object); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#129
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct
|
2023-12-14 15:34:15 +00:00
|
|
|
# Returns the value of attribute formatter
|
|
|
|
#
|
|
|
|
# @return [Object] the current value of formatter
|
2025-07-11 17:02:54 +00:00
|
|
|
#
|
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#129
|
2021-09-10 21:21:17 +01:00
|
|
|
def formatter; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute formatter
|
|
|
|
#
|
|
|
|
# @param value [Object] the value to set the attribute formatter to.
|
|
|
|
# @return [Object] the newly set value
|
2025-07-11 17:02:54 +00:00
|
|
|
#
|
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#129
|
2021-09-10 21:21:17 +01:00
|
|
|
def formatter=(_); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @raise [NotImplementedError]
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#134
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the value of attribute object
|
|
|
|
#
|
|
|
|
# @return [Object] the current value of object
|
2025-07-11 17:02:54 +00:00
|
|
|
#
|
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#129
|
2021-09-10 21:21:17 +01:00
|
|
|
def object; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute object
|
|
|
|
#
|
|
|
|
# @param value [Object] the value to set the attribute object to.
|
|
|
|
# @return [Object] the newly set value
|
2025-07-11 17:02:54 +00:00
|
|
|
#
|
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#129
|
2021-09-10 21:21:17 +01:00
|
|
|
def object=(_); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#138
|
2021-09-10 21:21:17 +01:00
|
|
|
def pretty_print(pp); end
|
|
|
|
|
|
|
|
class << self
|
2025-07-11 17:02:54 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#129
|
2021-09-10 21:21:17 +01:00
|
|
|
def [](*_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @raise [NotImplementedError]
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#130
|
2021-09-10 21:21:17 +01:00
|
|
|
def can_inspect?(_object); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2025-07-11 17:02:54 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#129
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
2025-07-11 17:02:54 +00:00
|
|
|
|
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#129
|
2023-12-14 15:34:15 +00:00
|
|
|
def keyword_init?; end
|
2025-07-11 17:02:54 +00:00
|
|
|
|
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#129
|
2021-09-10 21:21:17 +01:00
|
|
|
def members; end
|
2025-07-11 17:02:54 +00:00
|
|
|
|
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#129
|
2021-09-10 21:21:17 +01:00
|
|
|
def new(*_arg0); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#179
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::ObjectFormatter::BigDecimalInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#184
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#180
|
2021-09-10 21:21:17 +01:00
|
|
|
def can_inspect?(object); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#161
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::ObjectFormatter::DateTimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
2023-12-14 15:34:15 +00:00
|
|
|
# ActiveSupport sometimes overrides inspect. If `ActiveSupport` is
|
|
|
|
# defined use a custom format string that includes more time precision.
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#170
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#164
|
2021-09-10 21:21:17 +01:00
|
|
|
def can_inspect?(object); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#162
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::ObjectFormatter::DateTimeInspector::FORMAT = T.let(T.unsafe(nil), String)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#226
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::ObjectFormatter::DelegatorInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#231
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#227
|
2021-09-10 21:21:17 +01:00
|
|
|
def can_inspect?(object); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#189
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#194
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#190
|
2021-09-10 21:21:17 +01:00
|
|
|
def can_inspect?(object); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#11
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::ObjectFormatter::ELLIPSIS = T.let(T.unsafe(nil), String)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#249
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::ObjectFormatter::INSPECTOR_CLASSES = T.let(T.unsafe(nil), Array)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#119
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::ObjectFormatter::InspectableItem < ::Struct
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#120
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#124
|
2021-09-10 21:21:17 +01:00
|
|
|
def pretty_print(pp); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the value of attribute text
|
|
|
|
#
|
|
|
|
# @return [Object] the current value of text
|
2025-07-11 17:02:54 +00:00
|
|
|
#
|
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#119
|
2021-09-10 21:21:17 +01:00
|
|
|
def text; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute text
|
|
|
|
#
|
|
|
|
# @param value [Object] the value to set the attribute text to.
|
|
|
|
# @return [Object] the newly set value
|
2025-07-11 17:02:54 +00:00
|
|
|
#
|
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#119
|
2021-09-10 21:21:17 +01:00
|
|
|
def text=(_); end
|
|
|
|
|
|
|
|
class << self
|
2025-07-11 17:02:54 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#119
|
2021-09-10 21:21:17 +01:00
|
|
|
def [](*_arg0); end
|
2025-07-11 17:02:54 +00:00
|
|
|
|
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#119
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
2025-07-11 17:02:54 +00:00
|
|
|
|
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#119
|
2023-12-14 15:34:15 +00:00
|
|
|
def keyword_init?; end
|
2025-07-11 17:02:54 +00:00
|
|
|
|
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#119
|
2021-09-10 21:21:17 +01:00
|
|
|
def members; end
|
2025-07-11 17:02:54 +00:00
|
|
|
|
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#119
|
2021-09-10 21:21:17 +01:00
|
|
|
def new(*_arg0); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#236
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::ObjectFormatter::InspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#244
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#237
|
2021-09-10 21:21:17 +01:00
|
|
|
def can_inspect?(object); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#143
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::ObjectFormatter::TimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
2023-12-14 15:34:15 +00:00
|
|
|
# for 1.8.7
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#151
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#146
|
2021-09-10 21:21:17 +01:00
|
|
|
def can_inspect?(object); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#144
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::ObjectFormatter::TimeInspector::FORMAT = T.let(T.unsafe(nil), String)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#199
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::ObjectFormatter::UninspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#209
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#213
|
2021-09-10 21:21:17 +01:00
|
|
|
def klass; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# http://stackoverflow.com/a/2818916
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#218
|
2021-09-10 21:21:17 +01:00
|
|
|
def native_object_id; end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#202
|
2021-09-10 21:21:17 +01:00
|
|
|
def can_inspect?(object); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2025-05-01 22:43:11 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/object_formatter.rb#200
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::ObjectFormatter::UninspectableObjectInspector::OBJECT_ID_FORMAT = T.let(T.unsafe(nil), String)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Provides recursive constant lookup methods useful for
|
|
|
|
# constant stubbing.
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#7
|
2021-09-10 21:21:17 +01:00
|
|
|
module RSpec::Support::RecursiveConstMethods
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#45
|
2021-09-10 21:21:17 +01:00
|
|
|
def const_defined_on?(mod, const_name); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#53
|
2021-09-10 21:21:17 +01:00
|
|
|
def constants_defined_on(mod); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @raise [NameError]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#49
|
2021-09-10 21:21:17 +01:00
|
|
|
def get_const_defined_on(mod, const_name); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#73
|
2021-09-10 21:21:17 +01:00
|
|
|
def normalize_const_name(const_name); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#64
|
2021-09-10 21:21:17 +01:00
|
|
|
def recursive_const_defined?(const_name); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#58
|
2021-09-10 21:21:17 +01:00
|
|
|
def recursive_const_get(const_name); end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Allows a thread to lock out other threads from a critical section of code,
|
|
|
|
# while allowing the thread with the lock to reenter that section.
|
|
|
|
#
|
|
|
|
# Based on Monitor as of 2.2 -
|
|
|
|
# https://github.com/ruby/ruby/blob/eb7ddaa3a47bf48045d26c72eb0f263a53524ebc/lib/monitor.rb#L9
|
|
|
|
#
|
|
|
|
# Depends on Mutex, but Mutex is only available as part of core since 1.9.1:
|
|
|
|
# exists - http://ruby-doc.org/core-1.9.1/Mutex.html
|
|
|
|
# dne - http://ruby-doc.org/core-1.9.0/Mutex.html
|
|
|
|
#
|
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#16
|
2021-09-10 21:21:17 +01:00
|
|
|
class RSpec::Support::ReentrantMutex
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [ReentrantMutex] a new instance of ReentrantMutex
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#17
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize; end
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#23
|
2021-09-10 21:21:17 +01:00
|
|
|
def synchronize; end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#35
|
2021-09-10 21:21:17 +01:00
|
|
|
def enter; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#40
|
2021-09-10 21:21:17 +01:00
|
|
|
def exit; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Provides query methods for different rubies
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#26
|
2021-09-10 21:21:17 +01:00
|
|
|
module RSpec::Support::Ruby
|
|
|
|
private
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#29
|
2021-09-10 21:21:17 +01:00
|
|
|
def jruby?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#37
|
2021-09-10 21:21:17 +01:00
|
|
|
def jruby_9000?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#33
|
2021-09-10 21:21:17 +01:00
|
|
|
def jruby_version; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#49
|
2021-09-10 21:21:17 +01:00
|
|
|
def mri?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#45
|
2021-09-10 21:21:17 +01:00
|
|
|
def non_mri?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#41
|
2021-09-10 21:21:17 +01:00
|
|
|
def rbx?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#53
|
2021-09-10 21:21:17 +01:00
|
|
|
def truffleruby?; end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#29
|
2021-09-10 21:21:17 +01:00
|
|
|
def jruby?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#37
|
2021-09-10 21:21:17 +01:00
|
|
|
def jruby_9000?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#33
|
2021-09-10 21:21:17 +01:00
|
|
|
def jruby_version; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#49
|
2021-09-10 21:21:17 +01:00
|
|
|
def mri?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#45
|
2021-09-10 21:21:17 +01:00
|
|
|
def non_mri?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#41
|
2021-09-10 21:21:17 +01:00
|
|
|
def rbx?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#53
|
2021-09-10 21:21:17 +01:00
|
|
|
def truffleruby?; end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Provides query methods for ruby features that differ among
|
|
|
|
# implementations.
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#62
|
2021-09-10 21:21:17 +01:00
|
|
|
module RSpec::Support::RubyFeatures
|
|
|
|
private
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#85
|
2021-09-10 21:21:17 +01:00
|
|
|
def caller_locations_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#155
|
2022-11-05 17:54:22 +00:00
|
|
|
def distincts_kw_args_from_positional_hash?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# On JRuby 1.7 `--1.8` mode, `Process.respond_to?(:fork)` returns true,
|
|
|
|
# but when you try to fork, it raises an error:
|
|
|
|
# NotImplementedError: fork is not available on this platform
|
|
|
|
#
|
|
|
|
# When we drop support for JRuby 1.7 and/or Ruby 1.8, we can drop
|
|
|
|
# this special case.
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#76
|
2021-09-10 21:21:17 +01:00
|
|
|
def fork_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# https://rubyreferences.github.io/rubychanges/3.0.html#keyword-arguments-are-now-fully-separated-from-positional-arguments
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#111
|
2024-02-05 18:38:20 +00:00
|
|
|
def kw_arg_separation?; end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#160
|
2021-09-10 21:21:17 +01:00
|
|
|
def kw_args_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#216
|
2021-09-10 21:21:17 +01:00
|
|
|
def module_prepends_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#212
|
2021-09-10 21:21:17 +01:00
|
|
|
def module_refinement_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#81
|
2021-09-10 21:21:17 +01:00
|
|
|
def optional_and_splat_args_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#164
|
2021-09-10 21:21:17 +01:00
|
|
|
def required_kw_args_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#146
|
2021-09-10 21:21:17 +01:00
|
|
|
def ripper_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#90
|
2021-09-10 21:21:17 +01:00
|
|
|
def supports_exception_cause?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#168
|
2021-09-10 21:21:17 +01:00
|
|
|
def supports_rebinding_module_methods?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-12-03 19:04:50 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#100
|
2024-02-06 09:41:07 +00:00
|
|
|
def supports_syntax_suggest?; end
|
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#121
|
2021-09-10 21:21:17 +01:00
|
|
|
def supports_taint?; end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#85
|
2021-09-10 21:21:17 +01:00
|
|
|
def caller_locations_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#155
|
2022-11-05 17:54:22 +00:00
|
|
|
def distincts_kw_args_from_positional_hash?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#76
|
2021-09-10 21:21:17 +01:00
|
|
|
def fork_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#111
|
2024-02-05 18:38:20 +00:00
|
|
|
def kw_arg_separation?; end
|
|
|
|
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#160
|
2021-09-10 21:21:17 +01:00
|
|
|
def kw_args_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#216
|
2021-09-10 21:21:17 +01:00
|
|
|
def module_prepends_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#212
|
2021-09-10 21:21:17 +01:00
|
|
|
def module_refinement_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @api private
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#81
|
2021-09-10 21:21:17 +01:00
|
|
|
def optional_and_splat_args_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#164
|
2021-09-10 21:21:17 +01:00
|
|
|
def required_kw_args_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#146
|
2021-09-10 21:21:17 +01:00
|
|
|
def ripper_supported?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#90
|
2021-09-10 21:21:17 +01:00
|
|
|
def supports_exception_cause?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-06 09:41:07 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#168
|
2021-09-10 21:21:17 +01:00
|
|
|
def supports_rebinding_module_methods?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-12-03 19:04:50 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#100
|
2024-02-06 09:41:07 +00:00
|
|
|
def supports_syntax_suggest?; end
|
|
|
|
|
|
|
|
# source://rspec-support//lib/rspec/support/ruby_features.rb#121
|
2021-09-10 21:21:17 +01:00
|
|
|
def supports_taint?; end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# Figures out whether a given method can accept various arguments.
|
2023-12-14 15:34:15 +00:00
|
|
|
# Surprisingly non-trivial.
|
|
|
|
#
|
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#389
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::StrictSignatureVerifier = RSpec::Support::MethodSignatureVerifier
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/version.rb#5
|
2021-09-10 21:21:17 +01:00
|
|
|
module RSpec::Support::Version; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/version.rb#6
|
2021-09-10 21:21:17 +01:00
|
|
|
RSpec::Support::Version::STRING = T.let(T.unsafe(nil), String)
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/warnings.rb#8
|
2021-09-10 21:21:17 +01:00
|
|
|
module RSpec::Support::Warnings
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/warnings.rb#9
|
2021-09-10 21:21:17 +01:00
|
|
|
def deprecate(deprecated, options = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Used internally to print deprecation warnings
|
|
|
|
# when rspec-core isn't loaded
|
|
|
|
#
|
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/warnings.rb#17
|
2021-09-10 21:21:17 +01:00
|
|
|
def warn_deprecation(message, options = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Used internally to print longer warnings
|
|
|
|
#
|
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/warnings.rb#31
|
2021-09-10 21:21:17 +01:00
|
|
|
def warn_with(message, options = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Used internally to print warnings
|
|
|
|
#
|
|
|
|
# @private
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/warnings.rb#24
|
2021-09-10 21:21:17 +01:00
|
|
|
def warning(text, options = T.unsafe(nil)); end
|
|
|
|
end
|
|
|
|
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#7
|
2021-09-10 21:21:17 +01:00
|
|
|
module RSpec::Support::WithKeywordsWhenNeeded
|
|
|
|
private
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Remove this in RSpec 4 in favour of explicitly passed in kwargs where
|
|
|
|
# this is used. Works around a warning in Ruby 2.7
|
|
|
|
#
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#17
|
2023-12-14 15:34:15 +00:00
|
|
|
def class_exec(klass, *args, **_arg2, &block); end
|
2021-09-10 21:21:17 +01:00
|
|
|
|
|
|
|
class << self
|
2024-02-05 18:38:20 +00:00
|
|
|
# source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#17
|
2023-12-14 15:34:15 +00:00
|
|
|
def class_exec(klass, *args, **_arg2, &block); end
|
2021-09-10 21:21:17 +01:00
|
|
|
end
|
|
|
|
end
|