free_mutant/lib/mutant/strategy/rspec.rb

65 lines
1.3 KiB
Ruby
Raw Normal View History

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