diff --git a/Changelog.md b/Changelog.md index 948d629a8..d9346a49b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,9 @@ +# v0.12.4 2024-06-30 + +* [#1453](https://github.com/mbj/mutant/pull/1454) + + Fix parsing of empty rspec descriptions + # v0.12.3 2024-06-10 * [#1452](https://github.com/mbj/mutant/pull/1451) @@ -5,7 +11,6 @@ Remove support for EOL Ruby-3.0. Remove another invalid mutation to super(). - # v0.12.2 2024-06-09 * [#1450](https://github.com/mbj/mutant/pull/1450) diff --git a/Gemfile.lock b/Gemfile.lock index 0099f1f11..b75ba2413 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - mutant (0.12.3) + mutant (0.12.4) diff-lcs (~> 1.3) parser (~> 3.3.0) regexp_parser (~> 2.9.0) diff --git a/lib/mutant/integration/rspec.rb b/lib/mutant/integration/rspec.rb index b979bd944..91ebef36c 100644 --- a/lib/mutant/integration/rspec.rb +++ b/lib/mutant/integration/rspec.rb @@ -167,7 +167,7 @@ def parse_metadata(metadata) expressions.map(&method(:parse_expression)) else - match = EXPRESSION_CANDIDATE.match(metadata.fetch(:full_description)) + match = EXPRESSION_CANDIDATE.match(metadata.fetch(:full_description)) or return [ALL_EXPRESSION] [parse_expression(Util.one(match.captures)) { ALL_EXPRESSION }] end end diff --git a/lib/mutant/version.rb b/lib/mutant/version.rb index ff0426509..43309a75b 100644 --- a/lib/mutant/version.rb +++ b/lib/mutant/version.rb @@ -2,5 +2,5 @@ module Mutant # Current mutant version - VERSION = '0.12.3' + VERSION = '0.12.4' end # Mutant diff --git a/spec/unit/mutant/integration/rspec_spec.rb b/spec/unit/mutant/integration/rspec_spec.rb index 11e4fee69..00983472f 100644 --- a/spec/unit/mutant/integration/rspec_spec.rb +++ b/spec/unit/mutant/integration/rspec_spec.rb @@ -83,11 +83,21 @@ ) end + let(:example_g) do + double( + 'Example G', + metadata: { + location: 'example-g-location', + full_description: '' + } + ) + end + let(:leaf_example_group) do class_double( RSpec::Core::ExampleGroup, 'leaf example group', - examples: [example_a, example_b, example_c, example_d, example_e, example_f] + examples: [example_a, example_b, example_c, example_d, example_e, example_f, example_g] ) end @@ -147,6 +157,10 @@ Mutant::Test.new( id: 'rspec:5:example-f-location/Example::F', expressions: [parse_expression('Foo'), parse_expression('Bar')] + ), + Mutant::Test.new( + id: 'rspec:6:example-g-location/', + expressions: [parse_expression('*')] ) ] end diff --git a/test_app/Gemfile.minitest.lock b/test_app/Gemfile.minitest.lock index 2b3d7012b..d76019b70 100644 --- a/test_app/Gemfile.minitest.lock +++ b/test_app/Gemfile.minitest.lock @@ -1,15 +1,15 @@ PATH remote: .. specs: - mutant (0.12.3) + mutant (0.12.4) diff-lcs (~> 1.3) parser (~> 3.3.0) regexp_parser (~> 2.9.0) sorbet-runtime (~> 0.5.0) unparser (~> 0.6.14) - mutant-minitest (0.12.3) + mutant-minitest (0.12.4) minitest (~> 5.11) - mutant (= 0.12.3) + mutant (= 0.12.4) GEM remote: https://rubygems.org/ diff --git a/test_app/Gemfile.rspec3.10.lock b/test_app/Gemfile.rspec3.10.lock index 962c100f2..ba5fc1722 100644 --- a/test_app/Gemfile.rspec3.10.lock +++ b/test_app/Gemfile.rspec3.10.lock @@ -1,14 +1,14 @@ PATH remote: .. specs: - mutant (0.12.3) + mutant (0.12.4) diff-lcs (~> 1.3) parser (~> 3.3.0) regexp_parser (~> 2.9.0) sorbet-runtime (~> 0.5.0) unparser (~> 0.6.14) - mutant-rspec (0.12.3) - mutant (= 0.12.3) + mutant-rspec (0.12.4) + mutant (= 0.12.4) rspec-core (>= 3.8.0, < 4.0.0) GEM diff --git a/test_app/Gemfile.rspec3.11.lock b/test_app/Gemfile.rspec3.11.lock index b441444e4..cd9585d90 100644 --- a/test_app/Gemfile.rspec3.11.lock +++ b/test_app/Gemfile.rspec3.11.lock @@ -1,14 +1,14 @@ PATH remote: .. specs: - mutant (0.12.3) + mutant (0.12.4) diff-lcs (~> 1.3) parser (~> 3.3.0) regexp_parser (~> 2.9.0) sorbet-runtime (~> 0.5.0) unparser (~> 0.6.14) - mutant-rspec (0.12.3) - mutant (= 0.12.3) + mutant-rspec (0.12.4) + mutant (= 0.12.4) rspec-core (>= 3.8.0, < 4.0.0) GEM diff --git a/test_app/Gemfile.rspec3.12.lock b/test_app/Gemfile.rspec3.12.lock index d7472afe9..9d43e551f 100644 --- a/test_app/Gemfile.rspec3.12.lock +++ b/test_app/Gemfile.rspec3.12.lock @@ -1,14 +1,14 @@ PATH remote: .. specs: - mutant (0.12.3) + mutant (0.12.4) diff-lcs (~> 1.3) parser (~> 3.3.0) regexp_parser (~> 2.9.0) sorbet-runtime (~> 0.5.0) unparser (~> 0.6.14) - mutant-rspec (0.12.3) - mutant (= 0.12.3) + mutant-rspec (0.12.4) + mutant (= 0.12.4) rspec-core (>= 3.8.0, < 4.0.0) GEM diff --git a/test_app/Gemfile.rspec3.13.lock b/test_app/Gemfile.rspec3.13.lock index c7ee091d9..cea09ef1e 100644 --- a/test_app/Gemfile.rspec3.13.lock +++ b/test_app/Gemfile.rspec3.13.lock @@ -1,14 +1,14 @@ PATH remote: .. specs: - mutant (0.12.3) + mutant (0.12.4) diff-lcs (~> 1.3) parser (~> 3.3.0) regexp_parser (~> 2.9.0) sorbet-runtime (~> 0.5.0) unparser (~> 0.6.14) - mutant-rspec (0.12.3) - mutant (= 0.12.3) + mutant-rspec (0.12.4) + mutant (= 0.12.4) rspec-core (>= 3.8.0, < 4.0.0) GEM diff --git a/test_app/Gemfile.rspec3.8.lock b/test_app/Gemfile.rspec3.8.lock index d657b3685..13ca1b243 100644 --- a/test_app/Gemfile.rspec3.8.lock +++ b/test_app/Gemfile.rspec3.8.lock @@ -1,14 +1,14 @@ PATH remote: .. specs: - mutant (0.12.3) + mutant (0.12.4) diff-lcs (~> 1.3) parser (~> 3.3.0) regexp_parser (~> 2.9.0) sorbet-runtime (~> 0.5.0) unparser (~> 0.6.14) - mutant-rspec (0.12.3) - mutant (= 0.12.3) + mutant-rspec (0.12.4) + mutant (= 0.12.4) rspec-core (>= 3.8.0, < 4.0.0) GEM diff --git a/test_app/Gemfile.rspec3.9.lock b/test_app/Gemfile.rspec3.9.lock index d7472afe9..9d43e551f 100644 --- a/test_app/Gemfile.rspec3.9.lock +++ b/test_app/Gemfile.rspec3.9.lock @@ -1,14 +1,14 @@ PATH remote: .. specs: - mutant (0.12.3) + mutant (0.12.4) diff-lcs (~> 1.3) parser (~> 3.3.0) regexp_parser (~> 2.9.0) sorbet-runtime (~> 0.5.0) unparser (~> 0.6.14) - mutant-rspec (0.12.3) - mutant (= 0.12.3) + mutant-rspec (0.12.4) + mutant (= 0.12.4) rspec-core (>= 3.8.0, < 4.0.0) GEM