Class: Evilution::Integration::RSpec::UnresolvedSpecWarner

Inherits:
Object
  • Object
show all
Defined in:
lib/evilution/integration/rspec/unresolved_spec_warner.rb

Instance Method Summary collapse

Constructor Details

#initializeUnresolvedSpecWarner

Returns a new instance of UnresolvedSpecWarner.



6
7
8
# File 'lib/evilution/integration/rspec/unresolved_spec_warner.rb', line 6

def initialize
  @warned = Set.new
end

Instance Method Details

#call(file_path, fallback_to_full_suite:) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/evilution/integration/rspec/unresolved_spec_warner.rb', line 10

def call(file_path, fallback_to_full_suite:)
  return if @warned.include?(file_path)

  @warned << file_path
  action = fallback_to_full_suite ? "running full suite" : "marking mutation unresolved"
  warn "[evilution] No matching spec found for #{file_path}, #{action}. " \
       "Use --spec to specify the spec file."
end