class Mutant::Integration::Minitest::TestCase

Compose a runnable with test method

This looks actually like a missing object on minitest implementation.

Public Instance Methods

call(reporter) click to toggle source

Run test case

@param [Object] reporter

@return [Boolean]

# File lib/mutant/integration/minitest.rb, line 47
def call(reporter)
  ::Minitest::Runnable.run_one_method(klass, test_method, reporter)
  reporter.passed?
end
expressions(parser) click to toggle source

Parse expressions

@param [ExpressionParser] parser

@return [Array<Expression>]

# File lib/mutant/integration/minitest.rb, line 57
def expressions(parser)
  klass.resolve_cover_expressions.to_a.map do |value|
    parser.call(expand_constant(value)).from_right
  end
end
identification() click to toggle source

Identification string

@return [String]

# File lib/mutant/integration/minitest.rb, line 37
def identification
  IDENTIFICATION_FORMAT % [klass, test_method]
end

Private Instance Methods

expand_constant(value) click to toggle source
# File lib/mutant/integration/minitest.rb, line 65
def expand_constant(value)
  case value
  when Class, Module
    "#{value.name}*"
  else
    value
  end
end