diff --git a/lib/mutant/integration/rspec.rb b/lib/mutant/integration/rspec.rb index bd6a0c79..42f8a404 100644 --- a/lib/mutant/integration/rspec.rb +++ b/lib/mutant/integration/rspec.rb @@ -114,7 +114,9 @@ module Mutant # @api private # def all_examples - @world.example_groups.flat_map(&:descendants).flat_map(&:examples) + @world.example_groups.flat_map(&:descendants).flat_map(&:examples).select do |example| + example.metadata.fetch(:mutant, true) + end end # Filter examples diff --git a/spec/integration/mutant/corpus_spec.rb b/spec/integration/mutant/corpus_spec.rb index 65a8c326..0ad3ad05 100644 --- a/spec/integration/mutant/corpus_spec.rb +++ b/spec/integration/mutant/corpus_spec.rb @@ -1,4 +1,4 @@ -RSpec.describe 'Mutant on ruby corpus' do +RSpec.describe 'Mutant on ruby corpus', mutant: false do before do skip 'Corpus test is deactivated on < 2.1' if RUBY_VERSION < '2.1' diff --git a/spec/integration/mutant/null_spec.rb b/spec/integration/mutant/null_spec.rb index 6cd6735e..409b0398 100644 --- a/spec/integration/mutant/null_spec.rb +++ b/spec/integration/mutant/null_spec.rb @@ -1,4 +1,4 @@ -RSpec.describe 'null integration' do +RSpec.describe 'null integration', mutant: false do let(:base_cmd) { 'bundle exec mutant -I lib --require test_app "TestApp*"' } diff --git a/spec/integration/mutant/rspec_spec.rb b/spec/integration/mutant/rspec_spec.rb index ce691ded..08028160 100644 --- a/spec/integration/mutant/rspec_spec.rb +++ b/spec/integration/mutant/rspec_spec.rb @@ -1,4 +1,4 @@ -RSpec.describe 'rspec integration' do +RSpec.describe 'rspec integration', mutant: false do let(:base_cmd) { 'bundle exec mutant -I lib --require test_app --use rspec' } diff --git a/spec/integration/mutant/test_mutator_handles_types_spec.rb b/spec/integration/mutant/test_mutator_handles_types_spec.rb index 67b85de3..9042ac34 100644 --- a/spec/integration/mutant/test_mutator_handles_types_spec.rb +++ b/spec/integration/mutant/test_mutator_handles_types_spec.rb @@ -1,4 +1,4 @@ -RSpec.describe do +RSpec.describe 'AST type coverage', mutant: false do specify 'mutant should not crash for any node parser can generate' do Mutant::AST::Types::ALL.each do |type| diff --git a/spec/integration/mutant/zombie_spec.rb b/spec/integration/mutant/zombie_spec.rb index ae90fe3d..f9e6f377 100644 --- a/spec/integration/mutant/zombie_spec.rb +++ b/spec/integration/mutant/zombie_spec.rb @@ -1,4 +1,4 @@ -RSpec.describe 'as a zombie' do +RSpec.describe 'as a zombie', mutant: false do specify 'it allows to create zombie from mutant' do expect { Mutant.zombify }.to change { defined?(Zombie) }.from(nil).to('constant') expect(Zombie.constants).to include(:Mutant)