mutant 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd38b14761b4836ca3ce54a9bd8ea7a25d1f4dac6506b08ab6f6c64227a0f71d
4
- data.tar.gz: dbed2538feb3240195e76b8b10895ea01ba7dc827820a6106d00fa4a55da97d1
3
+ metadata.gz: ab8c8abc5b46ce5f0174cd6c23fdbdf1b172cb06b712d4043b28970c8f953fd1
4
+ data.tar.gz: 4dfb5d669b4f0af5314c2ad7f8313453142ae326d151011ca70850a689a2f23e
5
5
  SHA512:
6
- metadata.gz: c70d6881956ace0d359b13dcfd41ef4eb92dbabcf5ee90d913790b8a09bb1b12877e32c85453d3be97d9fd2a1523a0af307ebf7318550cd0e3413fc8d9ecb765
7
- data.tar.gz: 27b59ee208993bfc5b128269658fc4465782052613b0641c9647ace34cc10b956c72c8e05a5b8a6f86af77112589295e3289e53192d973500fe43ceed84180fc
6
+ metadata.gz: a2757e41fdd3739127a7062c405ce6c712ed90e0039d1a0257848768e5964559180ede292c79920466c3db6c1f91b9c96ced67f2cb7f093462a7334ad8b6cbe5
7
+ data.tar.gz: 844554fe5d142f9b9efa75b39def687cdadfc7d0b95e4f56e23b3722d68788f8929033cb5633c0077e86aa6b06477598c7dff12d514928299c09986cf5a98cb0
@@ -20,30 +20,28 @@ module Mutant
20
20
  #
21
21
  # @api public
22
22
  def cover(expression)
23
- if defined?(@cover_expression)
24
- fail "#{self} already declares to cover: #{@cover_expression.inspect}"
25
- end
23
+ @cover_expressions = Set.new unless defined?(@cover_expressions)
26
24
 
27
- @cover_expression = expression
25
+ @cover_expressions << expression
28
26
  end
29
27
 
30
28
  # Effective coverage expression
31
29
  #
32
- # @return [String, nil]
30
+ # @return [Set<String>]
33
31
  #
34
32
  # @api private
35
- def resolve_cover_expression
36
- return @cover_expression if defined?(@cover_expression)
33
+ def resolve_cover_expressions
34
+ return @cover_expressions if defined?(@cover_expressions)
37
35
 
38
- try_superclass_cover_expression
36
+ try_superclass_cover_expressions
39
37
  end
40
38
 
41
39
  private
42
40
 
43
- def try_superclass_cover_expression
41
+ def try_superclass_cover_expressions
44
42
  return if superclass.equal?(::Minitest::Runnable)
45
43
 
46
- superclass.resolve_cover_expression
44
+ superclass.resolve_cover_expressions
47
45
  end
48
46
 
49
47
  end # Coverage
@@ -14,7 +14,9 @@ module Mutant
14
14
  def call(subject)
15
15
  subject.match_expressions.each do |match_expression|
16
16
  subject_tests = integration.all_tests.select do |test|
17
- match_expression.prefix?(test.expression)
17
+ test.expressions.any? do |test_expression|
18
+ match_expression.prefix?(test_expression)
19
+ end
18
20
  end
19
21
  return subject_tests if subject_tests.any?
20
22
  end
@@ -4,7 +4,7 @@ module Mutant
4
4
  # Abstract base class for test that might kill a mutation
5
5
  class Test
6
6
  include Adamantium::Flat, Anima.new(
7
- :expression,
7
+ :expressions,
8
8
  :id
9
9
  )
10
10
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mutant
4
4
  # Current mutant version
5
- VERSION = '0.10.0'
5
+ VERSION = '0.10.1'
6
6
  end # Mutant
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Schirp
@@ -471,7 +471,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
471
471
  - !ruby/object:Gem::Version
472
472
  version: '0'
473
473
  requirements: []
474
- rubygems_version: 3.2.0.rc.1
474
+ rubygems_version: 3.1.4
475
475
  signing_key:
476
476
  specification_version: 4
477
477
  summary: ''