Class: Mutant::Integration::Minitest::TestCase

Inherits:
Object
  • Object
show all
Includes:
Adamantium
Defined in:
lib/mutant/integration/minitest.rb

Overview

Compose a runnable with test method

This looks actually like a missing object on minitest implementation.

Instance Method Summary collapse

Instance Method Details

#call(reporter) ⇒ Boolean

Run test case

Parameters:

  • reporter (Object)

Returns:

  • (Boolean)


47
48
49
50
# 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) ⇒ Array<Expression>

Parse expressions

Parameters:

  • parser (ExpressionParser)

Returns:

  • (Array<Expression>)


57
58
59
60
61
# 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

#identificationString

Identification string

Returns:

  • (String)


37
38
39
# File 'lib/mutant/integration/minitest.rb', line 37

def identification
  IDENTIFICATION_FORMAT % [klass, test_method]
end