class Minitest::Result
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.
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.
Attributes
klass
[RW]
untyped
The class name of the test result.
The class name of the test result.
source_location
[RW]
untyped
The location of the test method.
The location of the test method.
Public Class Methods
(untyped runnable) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/minitest-6.0.6/lib/minitest.rb, line 675 def self.from runnable o = runnable r = self.new o.name r.klass = o.class.name r.assertions = o.assertions r.failures = o.failures.dup r.time = o.time r.metadata = o.metadata if o.metadata? r.source_location = o.method(o.name).source_location rescue ["unknown", -1] r end
Public Instance Methods
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.1/stdlib/minitest/0/minitest/result.rbs, line 15
def class_name: () -> untyped
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.1/stdlib/minitest/0/minitest/result.rbs, line 16
def to_s: () -> untyped