Reconnect static strategies to cli
This commit is contained in:
parent
d358324450
commit
97c3ca5fde
2 changed files with 9 additions and 2 deletions
|
@ -240,6 +240,12 @@ module Mutant
|
|||
# @api private
|
||||
#
|
||||
def add_strategies(opts)
|
||||
opts.on('--static-success', 'does succeed on all mutations') do
|
||||
set_strategy Strategy::Static::Success.new
|
||||
end
|
||||
opts.on('--static-fail', 'does fail on all mutations') do
|
||||
set_strategy Strategy::Static::Fail.new
|
||||
end
|
||||
opts.on('--rspec', 'kills mutations with rspec') do
|
||||
set_strategy Strategy::Rspec.new
|
||||
end
|
||||
|
|
|
@ -49,9 +49,10 @@ describe Mutant::CLI, '.new' do
|
|||
end
|
||||
|
||||
context 'with many strategy flags' do
|
||||
let(:arguments) { %w(--rspec) }
|
||||
let(:arguments) { %w(--static-fail --rspec TestApp) }
|
||||
let(:expected_matcher) { Mutant::CLI::Classifier::Namespace::Flat.new(Mutant::Cache.new, 'TestApp') }
|
||||
|
||||
let(:expected_strategy) { Mutant::Strategy::Rspec }
|
||||
it_should_behave_like 'a cli parser'
|
||||
end
|
||||
|
||||
context 'without arguments' do
|
||||
|
|
Loading…
Reference in a new issue