free_mutant/lib/mutant/test.rb
2014-06-28 23:04:18 +00:00

28 lines
532 B
Ruby

module Mutant
# Abstract base class for test that might kill a mutation
class Test
include Adamantium::Flat, Concord::Public.new(:integration, :expression)
# Return test identification
#
# @return [String]
#
# @api private
#
def identification
"#{integration.name}:#{expression.syntax}"
end
memoize :identification
# Run test, return report
#
# @return [Report]
#
# @api private
#
def run
integration.run(self)
end
end # Test
end # Mutant