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 +4 -4
- data/lib/mutant/minitest/coverage.rb +8 -10
- data/lib/mutant/selector/expression.rb +3 -1
- data/lib/mutant/test.rb +1 -1
- data/lib/mutant/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab8c8abc5b46ce5f0174cd6c23fdbdf1b172cb06b712d4043b28970c8f953fd1
|
4
|
+
data.tar.gz: 4dfb5d669b4f0af5314c2ad7f8313453142ae326d151011ca70850a689a2f23e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
24
|
-
fail "#{self} already declares to cover: #{@cover_expression.inspect}"
|
25
|
-
end
|
23
|
+
@cover_expressions = Set.new unless defined?(@cover_expressions)
|
26
24
|
|
27
|
-
@
|
25
|
+
@cover_expressions << expression
|
28
26
|
end
|
29
27
|
|
30
28
|
# Effective coverage expression
|
31
29
|
#
|
32
|
-
# @return [String
|
30
|
+
# @return [Set<String>]
|
33
31
|
#
|
34
32
|
# @api private
|
35
|
-
def
|
36
|
-
return @
|
33
|
+
def resolve_cover_expressions
|
34
|
+
return @cover_expressions if defined?(@cover_expressions)
|
37
35
|
|
38
|
-
|
36
|
+
try_superclass_cover_expressions
|
39
37
|
end
|
40
38
|
|
41
39
|
private
|
42
40
|
|
43
|
-
def
|
41
|
+
def try_superclass_cover_expressions
|
44
42
|
return if superclass.equal?(::Minitest::Runnable)
|
45
43
|
|
46
|
-
superclass.
|
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
|
-
|
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
|
data/lib/mutant/test.rb
CHANGED
data/lib/mutant/version.rb
CHANGED
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.
|
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.
|
474
|
+
rubygems_version: 3.1.4
|
475
475
|
signing_key:
|
476
476
|
specification_version: 4
|
477
477
|
summary: ''
|