2012-12-07 10:55:53 -05:00
|
|
|
module Mutant
|
|
|
|
class Strategy
|
|
|
|
|
|
|
|
# Rspec strategy base class
|
|
|
|
class Rspec < self
|
|
|
|
|
|
|
|
KILLER = Killer::Forking.new(Killer::Rspec)
|
|
|
|
|
2013-01-18 15:38:46 -05:00
|
|
|
# Setup rspec strategy
|
|
|
|
#
|
|
|
|
# @return [self]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2013-06-15 10:32:40 -04:00
|
|
|
def self.setup
|
2013-01-18 15:38:46 -05:00
|
|
|
require('./spec/spec_helper.rb')
|
|
|
|
self
|
|
|
|
end
|
|
|
|
|
2012-12-07 10:55:53 -05:00
|
|
|
# Run all unit specs per mutation
|
|
|
|
class Unit < self
|
|
|
|
|
|
|
|
# Return file name pattern for mutation
|
|
|
|
#
|
2012-12-07 17:27:21 -05:00
|
|
|
# @return [Enumerable<String>]
|
2012-12-07 10:55:53 -05:00
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2013-06-15 11:15:14 -04:00
|
|
|
def self.spec_files(_mutation)
|
2013-01-14 07:36:26 -05:00
|
|
|
Dir['spec/unit/**/*_spec.rb']
|
2012-12-07 10:55:53 -05:00
|
|
|
end
|
2013-06-14 14:54:02 -04:00
|
|
|
end # Unit
|
2012-12-07 10:55:53 -05:00
|
|
|
|
|
|
|
# Run all integration specs per mutation
|
2012-12-07 17:27:21 -05:00
|
|
|
class Integration < self
|
2012-12-07 10:55:53 -05:00
|
|
|
|
|
|
|
# Return file name pattern for mutation
|
|
|
|
#
|
|
|
|
# @return [Mutation]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2013-06-15 11:15:14 -04:00
|
|
|
def self.spec_files(_mutation)
|
2012-12-07 10:55:53 -05:00
|
|
|
Dir['spec/integration/**/*_spec.rb']
|
|
|
|
end
|
2013-06-14 14:54:02 -04:00
|
|
|
end # Integration
|
2012-12-07 10:55:53 -05:00
|
|
|
|
|
|
|
# Run all specs per mutation
|
|
|
|
class Full < self
|
2012-12-12 16:31:14 -05:00
|
|
|
|
|
|
|
# Return spec files
|
|
|
|
#
|
|
|
|
# @return [Enumerable<String>]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2013-06-15 11:15:14 -04:00
|
|
|
def self.spec_files(_mutation)
|
2012-12-07 10:55:53 -05:00
|
|
|
Dir['spec/**/*_spec.rb']
|
|
|
|
end
|
2013-06-14 14:54:02 -04:00
|
|
|
end # Full
|
|
|
|
|
|
|
|
end # Rspec
|
|
|
|
end # Strategy
|
|
|
|
end # Mutant
|