free_mutant/lib/mutant/test.rb

29 lines
532 B
Ruby
Raw Normal View History

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