Module: Minitest::Reportable (Ruby 2.7.5)
Description: Module : Minitest::Reportable - Ruby 2.7.5

### Home Classes Methods

### In Files

- minitest-5.13.0/lib/minitest.rb

### Methods

- #error?
- #location
- #passed?
- #result_code
- #skipped?

### Files

- History.rdoc
- README.rdoc

### Class/Module Index

Quicksearch

- Kernel
- Minitest::AbstractReporter
- Minitest::Assertion
- Minitest::Assertions
- Minitest::BacktraceFilter
- Minitest::BenchSpec
- Minitest::Benchmark
- Minitest::CompositeReporter
- Minitest::Expectations
- Minitest::Guard
- Minitest::Mock
- Minitest::Parallel
- Minitest::Parallel::Executor
- Minitest::PrideIO
- Minitest::PrideLOL
- Minitest::ProgressReporter
- Minitest::Reportable
- Minitest::Result
- Minitest::Skip
- Minitest::Spec
- Minitest::Spec::DSL
- Minitest::Spec::DSL::InstanceMethods
- Minitest::StatisticsReporter
- Minitest::SummaryReporter
- Minitest::Test
- Minitest::Test::LifecycleHooks
- Minitest::UnexpectedError
- Object
- SubThingySpec
- ThingySpec

No matching classes.

# Minitest::Reportable

Shared code for anything that can get passed to a Reporter. See `Minitest::Test` & `Minitest::Result`.

### Public Instance Methods

error?() click to toggle source

Did this run error?

                   # File minitest-5.13.0/lib/minitest.rb, line 490
    def error?
      self.failures.any? { |f| UnexpectedError === f }
    end

location() click to toggle source

The location identifier of this test. Depends on a method existing called class_name.

                   # File minitest-5.13.0/lib/minitest.rb, line 464
    def location
      loc = " [#{self.failure.location}]" unless passed? or error?
      "#{self.class_name}##{self.name}#{loc}"
    end

passed?() click to toggle source

Did this run pass?

Note: skipped runs are not considered passing, but they don't cause the process to exit non-zero.

                   # File minitest-5.13.0/lib/minitest.rb, line 456
    def passed?
      not self.failure
    end

result_code() click to toggle source

Returns “.”, “F”, or “E” based on the result of the run.

                   # File minitest-5.13.0/lib/minitest.rb, line 476
    def result_code
      self.failure and self.failure.result_code or "."
    end

skipped?() click to toggle source

Was this run skipped?

                   # File minitest-5.13.0/lib/minitest.rb, line 483
    def skipped?
      self.failure and Skip === self.failure
    end