7be00708b6
* Expand foo? to foo_predicate_spec.rb * Expand foo! to foo_bang_spec.rb * Execute all public method specs on mutation of private method * Warn on stderr when no spec file was found (better than nothing to be iproved later)
42 lines
668 B
Ruby
42 lines
668 B
Ruby
module Mutant
|
|
class Strategy
|
|
include AbstractType
|
|
|
|
# Kill mutation
|
|
#
|
|
# @param [Mutation]
|
|
#
|
|
# @return [Killer]
|
|
#
|
|
# @api private
|
|
#
|
|
def self.kill(mutation)
|
|
killer.new(self, mutation)
|
|
end
|
|
|
|
# Return killer
|
|
#
|
|
# @return [Class:Killer]
|
|
#
|
|
# @api private
|
|
#
|
|
def self.killer
|
|
self::KILLER
|
|
end
|
|
|
|
# Static strategies
|
|
class Static < self
|
|
|
|
# Always fail to kill strategy
|
|
class Fail < self
|
|
KILLER = Killer::Static::Fail
|
|
end
|
|
|
|
# Always succeed to kill strategy
|
|
class Success < self
|
|
KILLER = Killer::Static::Success
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|