mutant-rspec 0.14.2 → 0.15.0
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/lib/mutant/integration/rspec.rb +6 -21
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1e1ab2c50ca63a8441df0e103f2b6ceb3fb47c88611004c514ddd91a81f35ca1
|
|
4
|
+
data.tar.gz: 7e910eb17629341afe00ea41fd7031ddc022285fd6f41f95d0b4d4066e3a1261
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9d5616c09b5fd359c223f435728b012ddfb327fdc58537f13e2b6ea2045eb8feafb131a003c9e7166d2f65c0b0a907e876b47f3840a6c75ff97587be9a93ffa7
|
|
7
|
+
data.tar.gz: 60443f7cd4603aa6e2f8ffd93bdcc2ae61182df5b51e3b5e4fe24ef9b93c2df7dea7d479f40a7d5f40a569c89aa9cd1e7a2af42944062825aaa5da10a6f79388
|
|
@@ -20,7 +20,6 @@ module Mutant
|
|
|
20
20
|
# Is NOT enough. It would not be unique. So we add an "example index"
|
|
21
21
|
# for unique reference.
|
|
22
22
|
#
|
|
23
|
-
# rubocop:disable Metrics/ClassLength
|
|
24
23
|
class Rspec < self
|
|
25
24
|
ALL_EXPRESSION = Expression::Namespace::Recursive.new(scope_name: nil)
|
|
26
25
|
EXPRESSION_CANDIDATE = /\A([^ ]+)(?: )?/
|
|
@@ -30,10 +29,7 @@ module Mutant
|
|
|
30
29
|
|
|
31
30
|
private_constant(*constants(false))
|
|
32
31
|
|
|
33
|
-
def freeze
|
|
34
|
-
super if @setup_elapsed
|
|
35
|
-
self
|
|
36
|
-
end
|
|
32
|
+
def freeze = tap { super if @setup_elapsed }
|
|
37
33
|
|
|
38
34
|
# Initialize rspec integration
|
|
39
35
|
#
|
|
@@ -89,17 +85,13 @@ module Mutant
|
|
|
89
85
|
# All tests
|
|
90
86
|
#
|
|
91
87
|
# @return [Enumerable<Test>]
|
|
92
|
-
def all_tests
|
|
93
|
-
all_tests_index.keys
|
|
94
|
-
end
|
|
88
|
+
def all_tests = all_tests_index.keys
|
|
95
89
|
memoize :all_tests
|
|
96
90
|
|
|
97
91
|
# Available tests
|
|
98
92
|
#
|
|
99
93
|
# @return [Enumerable<Test>]
|
|
100
|
-
def available_tests
|
|
101
|
-
all_tests_index.select { |_test, example| example.metadata.fetch(:mutant, true) }.keys
|
|
102
|
-
end
|
|
94
|
+
def available_tests = all_tests_index.select { |_test, example| example.metadata.fetch(:mutant, true) }.keys
|
|
103
95
|
memoize :available_tests
|
|
104
96
|
|
|
105
97
|
private
|
|
@@ -112,13 +104,9 @@ module Mutant
|
|
|
112
104
|
@rspec_world.respond_to?(:rspec_is_quitting) && @rspec_world.rspec_is_quitting
|
|
113
105
|
end
|
|
114
106
|
|
|
115
|
-
def effective_arguments
|
|
116
|
-
arguments.empty? ? DEFAULT_CLI_OPTIONS : arguments
|
|
117
|
-
end
|
|
107
|
+
def effective_arguments = arguments.empty? ? DEFAULT_CLI_OPTIONS : arguments
|
|
118
108
|
|
|
119
|
-
def reset_examples
|
|
120
|
-
@rspec_world.filtered_examples.each_value(&:clear)
|
|
121
|
-
end
|
|
109
|
+
def reset_examples = @rspec_world.filtered_examples.each_value(&:clear)
|
|
122
110
|
|
|
123
111
|
def setup_examples(examples)
|
|
124
112
|
examples.each do |example|
|
|
@@ -176,10 +164,7 @@ module Mutant
|
|
|
176
164
|
expression_parser.call(input).from_right(&)
|
|
177
165
|
end
|
|
178
166
|
|
|
179
|
-
def all_examples
|
|
180
|
-
@rspec_world.example_groups.flat_map(&:descendants).flat_map(&:examples)
|
|
181
|
-
end
|
|
167
|
+
def all_examples = @rspec_world.example_groups.flat_map(&:descendants).flat_map(&:examples)
|
|
182
168
|
end # Rspec
|
|
183
|
-
# rubocop:enable Metrics/ClassLength
|
|
184
169
|
end # Integration
|
|
185
170
|
end # Mutant
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mutant-rspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Markus Schirp
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.15.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.15.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: rspec-core
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -32,7 +32,7 @@ dependencies:
|
|
|
32
32
|
version: 3.8.0
|
|
33
33
|
- - "<"
|
|
34
34
|
- !ruby/object:Gem::Version
|
|
35
|
-
version:
|
|
35
|
+
version: 5.0.0
|
|
36
36
|
type: :runtime
|
|
37
37
|
prerelease: false
|
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -42,7 +42,7 @@ dependencies:
|
|
|
42
42
|
version: 3.8.0
|
|
43
43
|
- - "<"
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
|
-
version:
|
|
45
|
+
version: 5.0.0
|
|
46
46
|
description: Rspec integration for mutant
|
|
47
47
|
email:
|
|
48
48
|
- mbj@schirp-dso.com
|