diff --git a/config/flay.yml b/config/flay.yml index 48ca586b..a210fa14 100644 --- a/config/flay.yml +++ b/config/flay.yml @@ -1,3 +1,3 @@ --- threshold: 16 -total_score: 614 +total_score: 607 diff --git a/lib/mutant/strategy/rspec/dm2/lookup/method.rb b/lib/mutant/strategy/rspec/dm2/lookup/method.rb index b2a8224d..04509808 100644 --- a/lib/mutant/strategy/rspec/dm2/lookup/method.rb +++ b/lib/mutant/strategy/rspec/dm2/lookup/method.rb @@ -106,11 +106,12 @@ module Mutant # @api private # def glob_expression + glob_expression = super if method_name == :initialize and !public? - return "#{private_glob_expression} #{base_path}/class_methods/new_spec.rb" + "{#{glob_expression},#{base_path}/class_methods/new_spec.rb}" + else + glob_expression end - - super end end # Instance diff --git a/spec/unit/mutant/strategy/rspec/dm2/lookup/method/instance/spec_files_spec.rb b/spec/unit/mutant/strategy/rspec/dm2/lookup/method/instance/spec_files_spec.rb index 6fdbca51..fabd5eab 100644 --- a/spec/unit/mutant/strategy/rspec/dm2/lookup/method/instance/spec_files_spec.rb +++ b/spec/unit/mutant/strategy/rspec/dm2/lookup/method/instance/spec_files_spec.rb @@ -42,8 +42,8 @@ describe Mutant::Strategy::Rspec::DM2::Lookup::Method::Instance, '#spec_files' d end context 'initialize' do - let(:method_name) { :initialize } - let(:expected_glob_expression) { 'spec/unit/foo/*_spec.rb spec/unit/foo/class_methods/new_spec.rb' } + let(:method_name) { :initialize } + let(:expected_glob_expression) { '{spec/unit/foo/*_spec.rb,spec/unit/foo/class_methods/new_spec.rb}' } it_should_behave_like this_example_group end