flakey_spec_catcher 0.11.1 → 0.11.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adf31fd04e49611a2c10622b19350ab444224589815ac5f54948ec6aad53fc3a
|
4
|
+
data.tar.gz: 23526cc9694ac22402e6b47fbe956197af5be8b5648abba785e822884e1cd747
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e15abca29cc1a0186ceadcb83f6238c3a847b4f59747e8c8bc0ef23387ed2a8b5cf3777675d32690bfb529b8e7aba6e6e8ba9970d3d9628628392cfa346506b
|
7
|
+
data.tar.gz: ce915b99014c9eee3210e55663dec289b20dcb39936a28ffd299fc7c0bb003561ef3d67e4a620bf28057e8ae4fe60aca1ed17f2e66436aa6d0f0fdae928e2629
|
@@ -131,6 +131,10 @@ module FlakeySpecCatcher
|
|
131
131
|
|
132
132
|
current_scope = change_contexts[-1].rerun_info
|
133
133
|
parent_scope = change_contexts[-2].rerun_info
|
134
|
+
|
135
|
+
# Don't build the file level context into spec tree
|
136
|
+
return unless parent_scope =~ /:/
|
137
|
+
|
134
138
|
@spec_tree[parent_scope] = if @spec_tree[parent_scope]
|
135
139
|
@spec_tree[parent_scope] << current_scope
|
136
140
|
else
|
@@ -173,11 +173,22 @@ module FlakeySpecCatcher
|
|
173
173
|
end
|
174
174
|
end
|
175
175
|
|
176
|
+
def transform_file_level_change(test, tree)
|
177
|
+
# Map file level changes to the highest level Example Group in the tree
|
178
|
+
if test =~ /:/
|
179
|
+
test
|
180
|
+
else
|
181
|
+
tree.keys.first
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
176
185
|
def transform_parent_specs(tests)
|
177
186
|
transformed_tests = []
|
187
|
+
|
178
188
|
tests.each do |test|
|
179
189
|
capsule = @git_controller.capsule_manager.change_capsules.find { |c| c.file_name == test.split(':')[0] }
|
180
190
|
spec_tree = capsule.spec_tree
|
191
|
+
test = transform_file_level_change(test, spec_tree)
|
181
192
|
# If test is a key in the spec_tree, it's an example group, so we queue up its descendant examples
|
182
193
|
if spec_tree[test]
|
183
194
|
spec_tree[test].each do |child|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flakey_spec_catcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Watson
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-10-
|
13
|
+
date: 2021-10-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|