mutant-rspec 0.9.0 → 0.9.13
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/LICENSE +1 -1
- data/lib/mutant/integration/rspec.rb +1 -29
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f6c92f00c2297ff3573a4d5112a1e70ba74ec16abc1073d524916ead4d85a0ff
|
|
4
|
+
data.tar.gz: 6ba231760086257dfb2793b4f5fb2a7cf99843181bb196c1d9a61d19596ad43d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e9f1094b92e20cc9fefcb89ec7fcdcf81ee97a51462ced560306d6902b7b4b2388d7e50dbe688243de4d245d651bb48677de4342453d8c6d8fd548253533201
|
|
7
|
+
data.tar.gz: 3f7fe80805a9d2c99474f9e8f8b120a2c66352333218dd73f181cb5cbcc956e585d40c6b630ed6f3cfd0a2fb4d07edace026775a552455374db381c373ca6a88
|
data/LICENSE
CHANGED
|
@@ -116,7 +116,7 @@ the net income of Schirp DSO LTD).
|
|
|
116
116
|
|
|
117
117
|
6. Support, Maintenance and Services. Subject to the terms and conditions of
|
|
118
118
|
this Agreement, as set forth in your invoice, and as set forth on the Mutant
|
|
119
|
-
support page (https://github.com/mbj/mutant/
|
|
119
|
+
support page (https://github.com/mbj/mutant/blob/master/docs/commercial-support.md)
|
|
120
120
|
support and maintenance services may be included with the purchase of your
|
|
121
121
|
license subscription.
|
|
122
122
|
|
|
@@ -55,7 +55,7 @@ module Mutant
|
|
|
55
55
|
#
|
|
56
56
|
# @return [Result::Test]
|
|
57
57
|
#
|
|
58
|
-
# rubocop:disable MethodLength
|
|
58
|
+
# rubocop:disable Metrics/MethodLength
|
|
59
59
|
def call(tests)
|
|
60
60
|
examples = tests.map(&all_tests_index.method(:fetch))
|
|
61
61
|
filter_examples(&examples.method(:include?))
|
|
@@ -80,9 +80,6 @@ module Mutant
|
|
|
80
80
|
|
|
81
81
|
private
|
|
82
82
|
|
|
83
|
-
# Index of available tests
|
|
84
|
-
#
|
|
85
|
-
# @return [Hash<Test, RSpec::Core::Example]
|
|
86
83
|
def all_tests_index
|
|
87
84
|
all_examples.each_with_index.each_with_object({}) do |(example, example_index), index|
|
|
88
85
|
index[parse_example(example, example_index)] = example
|
|
@@ -90,12 +87,6 @@ module Mutant
|
|
|
90
87
|
end
|
|
91
88
|
memoize :all_tests_index
|
|
92
89
|
|
|
93
|
-
# Parse example into test
|
|
94
|
-
#
|
|
95
|
-
# @param [RSpec::Core::Example] example
|
|
96
|
-
# @param [Integer] index
|
|
97
|
-
#
|
|
98
|
-
# @return [Test]
|
|
99
90
|
def parse_example(example, index)
|
|
100
91
|
metadata = example.metadata
|
|
101
92
|
|
|
@@ -111,11 +102,6 @@ module Mutant
|
|
|
111
102
|
)
|
|
112
103
|
end
|
|
113
104
|
|
|
114
|
-
# Parse metadata into expression
|
|
115
|
-
#
|
|
116
|
-
# @param [RSpec::Core::Example::MetaData] metadata
|
|
117
|
-
#
|
|
118
|
-
# @return [Expression]
|
|
119
105
|
def parse_metadata(metadata)
|
|
120
106
|
if metadata.key?(:mutant_expression)
|
|
121
107
|
parse_expression(metadata.fetch(:mutant_expression))
|
|
@@ -125,30 +111,16 @@ module Mutant
|
|
|
125
111
|
end
|
|
126
112
|
end
|
|
127
113
|
|
|
128
|
-
# Parse expression
|
|
129
|
-
#
|
|
130
|
-
# @param [String] input
|
|
131
|
-
# @param [Proc] default
|
|
132
|
-
#
|
|
133
|
-
# @return [Expression]
|
|
134
114
|
def parse_expression(input, &default)
|
|
135
115
|
expression_parser.apply(input).from_right(&default)
|
|
136
116
|
end
|
|
137
117
|
|
|
138
|
-
# Available rspec examples
|
|
139
|
-
#
|
|
140
|
-
# @return [Array<String, RSpec::Core::Example]
|
|
141
118
|
def all_examples
|
|
142
119
|
@world.example_groups.flat_map(&:descendants).flat_map(&:examples).select do |example|
|
|
143
120
|
example.metadata.fetch(:mutant, true)
|
|
144
121
|
end
|
|
145
122
|
end
|
|
146
123
|
|
|
147
|
-
# Filter examples
|
|
148
|
-
#
|
|
149
|
-
# @param [#call] predicate
|
|
150
|
-
#
|
|
151
|
-
# @return [undefined]
|
|
152
124
|
def filter_examples(&predicate)
|
|
153
125
|
@world.filtered_examples.each_value do |examples|
|
|
154
126
|
examples.keep_if(&predicate)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mutant-rspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Markus Schirp
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-10-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: mutant
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.9.
|
|
19
|
+
version: 0.9.13
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0.9.
|
|
26
|
+
version: 0.9.13
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rspec-core
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -58,7 +58,7 @@ homepage: https://github.com/mbj/mutant
|
|
|
58
58
|
licenses:
|
|
59
59
|
- Nonstandard
|
|
60
60
|
metadata: {}
|
|
61
|
-
post_install_message:
|
|
61
|
+
post_install_message:
|
|
62
62
|
rdoc_options: []
|
|
63
63
|
require_paths:
|
|
64
64
|
- lib
|
|
@@ -73,8 +73,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
73
73
|
- !ruby/object:Gem::Version
|
|
74
74
|
version: '0'
|
|
75
75
|
requirements: []
|
|
76
|
-
rubygems_version: 3.
|
|
77
|
-
signing_key:
|
|
76
|
+
rubygems_version: 3.1.2
|
|
77
|
+
signing_key:
|
|
78
78
|
specification_version: 4
|
|
79
79
|
summary: Rspec integration for mutant
|
|
80
80
|
test_files: []
|