mutant-rspec 0.11.19 → 0.11.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mutant/integration/rspec.rb +16 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a14fe93c9de0de6c8ebdf4b2901ba522759d6c1e411b72d62e6ee87ed35b33c
|
4
|
+
data.tar.gz: 2565a128a4b6a0ddcbeca1f5b90ab97834bc7659ffb246cac622585a7e0665bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 197d810ba17ec786935df91e625d85194b5d1e51c82053b02af185e66b51f287bb9caf7359c98db106e7dc7653564b1d86b46b23a5f80f6584172c88b65c76ae
|
7
|
+
data.tar.gz: 9182e84f29bb03f6d7dcfc3a7a72a71f0f65ff0967f7ae8c147f8635aa80faf3cf5d353647eac2f6f5051300f225bf38aac211538f499a3d0059c92e3b92e43c
|
@@ -24,7 +24,7 @@ module Mutant
|
|
24
24
|
ALL_EXPRESSION = Expression::Namespace::Recursive.new(scope_name: nil)
|
25
25
|
EXPRESSION_CANDIDATE = /\A([^ ]+)(?: )?/.freeze
|
26
26
|
EXIT_SUCCESS = 0
|
27
|
-
|
27
|
+
DEFAULT_CLI_OPTIONS = %w[--fail-fast spec].freeze
|
28
28
|
TEST_ID_FORMAT = 'rspec:%<index>d:%<location>s/%<description>s'
|
29
29
|
|
30
30
|
private_constant(*constants(false))
|
@@ -34,7 +34,7 @@ module Mutant
|
|
34
34
|
# @return [undefined]
|
35
35
|
def initialize(*)
|
36
36
|
super
|
37
|
-
@runner = RSpec::Core::Runner.new(RSpec::Core::ConfigurationOptions.new(
|
37
|
+
@runner = RSpec::Core::Runner.new(RSpec::Core::ConfigurationOptions.new(effective_arguments))
|
38
38
|
@rspec_world = RSpec.world
|
39
39
|
end
|
40
40
|
|
@@ -64,7 +64,7 @@ module Mutant
|
|
64
64
|
)
|
65
65
|
end
|
66
66
|
|
67
|
-
#
|
67
|
+
# All tests
|
68
68
|
#
|
69
69
|
# @return [Enumerable<Test>]
|
70
70
|
def all_tests
|
@@ -72,8 +72,20 @@ module Mutant
|
|
72
72
|
end
|
73
73
|
memoize :all_tests
|
74
74
|
|
75
|
+
# Available tests
|
76
|
+
#
|
77
|
+
# @return [Enumerable<Test>]
|
78
|
+
def available_tests
|
79
|
+
all_tests_index.select { |_test, example| example.metadata.fetch(:mutant, true) }.keys
|
80
|
+
end
|
81
|
+
memoize :available_tests
|
82
|
+
|
75
83
|
private
|
76
84
|
|
85
|
+
def effective_arguments
|
86
|
+
arguments.empty? ? DEFAULT_CLI_OPTIONS : arguments
|
87
|
+
end
|
88
|
+
|
77
89
|
def reset_examples
|
78
90
|
@rspec_world.filtered_examples.each_value(&:clear)
|
79
91
|
end
|
@@ -134,11 +146,8 @@ module Mutant
|
|
134
146
|
end
|
135
147
|
|
136
148
|
def all_examples
|
137
|
-
@rspec_world.example_groups.flat_map(&:descendants).flat_map(&:examples)
|
138
|
-
example.metadata.fetch(:mutant, true)
|
139
|
-
end
|
149
|
+
@rspec_world.example_groups.flat_map(&:descendants).flat_map(&:examples)
|
140
150
|
end
|
141
|
-
|
142
151
|
end # Rspec
|
143
152
|
end # Integration
|
144
153
|
end # Mutant
|
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.11.
|
4
|
+
version: 0.11.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-15 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.11.
|
19
|
+
version: 0.11.21
|
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.11.
|
26
|
+
version: 0.11.21
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec-core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|