defmastership-core 1.5.3 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/mutant.yml +2 -1
- data/lib/defmastership/core/constants.rb +4 -7
- data/lib/defmastership/core/version.rb +1 -1
- data/spec/spec_helper.rb +12 -10
- data/tasks/test.rake +15 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 569e097ffe8f9725fd5f5af26b7adb6a1a36cce58a20ed7dbbb43fb3d5043a24
|
4
|
+
data.tar.gz: 826d17760e813f5bf07fb95ec9a1b392e4af67daf36a803cd638daf33179e230
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b666d773c4507263eea5aeb66a667f855ba40e2c4e83789da152b1108be3048763386711de26c51d5323f735e35bb7727e77d9cf7441b2e8f25cf38eff807e29
|
7
|
+
data.tar.gz: 933485a71bc31df74eb8d3648fd21b172de1da4c0f3269d38f99343413001768aa2b876198231b22577b8fb5b9b396a3f6b60f5920c5d49b45c768af506d5489
|
data/config/mutant.yml
CHANGED
@@ -7,10 +7,11 @@ integration:
|
|
7
7
|
arguments:
|
8
8
|
- --options=config/rspec
|
9
9
|
- spec
|
10
|
+
environment_variables:
|
11
|
+
CODE_COVERAGE_IN_RSPEC: disabled
|
10
12
|
requires:
|
11
13
|
- defmastership/core/constants
|
12
14
|
- defmastership/core/parsing_state
|
13
15
|
matcher:
|
14
16
|
subjects:
|
15
17
|
- 'Defmastership::Core*'
|
16
|
-
# fail_fast: true
|
@@ -49,7 +49,7 @@ module Defmastership
|
|
49
49
|
public_constant :REFERENCE
|
50
50
|
|
51
51
|
# [Regexp] match reference with optional version and checksum
|
52
|
-
REF_WITH_OPT_VER_CHK = "
|
52
|
+
REF_WITH_OPT_VER_CHK = "#{REFERENCE}#{DEF_VERSION_AND_CHECKSUM}".freeze
|
53
53
|
public_constant :REF_WITH_OPT_VER_CHK
|
54
54
|
|
55
55
|
# [Regexp] match defintion summary
|
@@ -77,17 +77,14 @@ module Defmastership
|
|
77
77
|
|
78
78
|
# [Regexp] match a definition line
|
79
79
|
definition_re_string = <<~"DEF"
|
80
|
-
|
81
|
-
\\s*
|
82
|
-
\\[
|
80
|
+
^\\s*\\[
|
83
81
|
#{DEF_KEYWORD}
|
84
82
|
#{DEF_TYPE}
|
85
83
|
,
|
86
|
-
|
84
|
+
\\s*#{REF_WITH_OPT_VER_CHK}
|
87
85
|
#{DEF_SUMMARY}
|
88
86
|
#{DEF_LABELS}
|
89
|
-
\\s
|
90
|
-
\\]
|
87
|
+
\\s*\\]
|
91
88
|
DEF
|
92
89
|
# [Regexp] match a definition line
|
93
90
|
DEFINITION = Regexp.new(definition_re_string, Regexp::EXTENDED)
|
data/spec/spec_helper.rb
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
# Copyright (c) 2020 Jerome Arbez-Gindre
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
4
|
+
unless ENV['CODE_COVERAGE_IN_RSPEC'] && ENV['DISABLE_CODE_COVERAGE_IN_RSPEC'] != 'disabled'
|
5
|
+
require('simplecov')
|
5
6
|
|
6
|
-
SimpleCov.start do
|
7
|
-
|
7
|
+
SimpleCov.start do
|
8
|
+
command_name 'spec:unit'
|
8
9
|
|
9
|
-
|
10
|
-
|
10
|
+
add_group 'Libraries', 'lib'
|
11
|
+
add_group 'Unit test', 'spec/unit'
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
13
|
+
add_filter 'config'
|
14
|
+
add_filter 'vendor'
|
15
|
+
add_filter 'set_join_hack'
|
15
16
|
|
16
|
-
|
17
|
-
|
17
|
+
enable_coverage :branch
|
18
|
+
minimum_coverage line: 100, branch: 100
|
19
|
+
end
|
18
20
|
end
|
19
21
|
|
20
22
|
RSpec::Matchers.define(:matchdata_including) do |h|
|
data/tasks/test.rake
CHANGED
@@ -8,6 +8,18 @@ namespace 'test' do
|
|
8
8
|
t.rspec_opts = ['--options config/rspec']
|
9
9
|
end
|
10
10
|
|
11
|
+
desc 'mutation testing'
|
12
|
+
task :mutation do
|
13
|
+
sh 'mutant run'
|
14
|
+
end
|
15
|
+
|
16
|
+
namespace 'mutation' do
|
17
|
+
desc 'mutation testing (fail fast)'
|
18
|
+
task :ff do
|
19
|
+
sh 'mutant run --fail-fast'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
11
23
|
desc 'Runs all unit tests'
|
12
24
|
task(all: ['test:spec'])
|
13
25
|
end
|
@@ -17,3 +29,6 @@ task(spec: 'test:spec')
|
|
17
29
|
|
18
30
|
desc 'Synonym for test:all'
|
19
31
|
task(test: 'test:all')
|
32
|
+
|
33
|
+
desc 'Synonym for test:mutation'
|
34
|
+
task(mutation: 'test:mutation')
|