rspec-retryable 0.2.0 → 0.3.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/rspec/retryable/example.rb +10 -3
- data/lib/rspec/retryable/handlers.rb +4 -0
- data/lib/rspec/retryable/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74425f47885aa36a1b21e33fd7d063010cc492b5e25162c402758baf526831dd
|
4
|
+
data.tar.gz: 384f1dc2b0f850a0383ddd3e0e793eada3c16c47ea2157d5bfe61a1aaf18a433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 672cae2a99e162744822dd1bb148f938a3a7dfa604dc2e594424fdb8f2edbd5a479f8804a72e9cfc3ad09675c63f28b97f976c4cfad2361475d85ef428ff97ee
|
7
|
+
data.tar.gz: 77bd6c7464e1e752a2f70b3b3fe83606e47fe6832d62212ebd089937967d6b1b20ec958d16b59cababae3ee12a3cefeed762fb4c28748645814af8e5924218d2
|
@@ -28,8 +28,6 @@ module RSpec
|
|
28
28
|
if @payload.retry
|
29
29
|
# Replaced the final result by the retry result
|
30
30
|
@payload.result = retry_example
|
31
|
-
# Update the execution result status to the new state
|
32
|
-
execution_result.status = @payload.state
|
33
31
|
end
|
34
32
|
|
35
33
|
# Notify reporter only if it's not handled by the handlers
|
@@ -65,7 +63,16 @@ module RSpec
|
|
65
63
|
# Use same reporter from example instead of the one passing in to behave like
|
66
64
|
# a fresh new example.
|
67
65
|
|
68
|
-
new_example.run(instance, reporter)
|
66
|
+
result = new_example.run(instance, reporter)
|
67
|
+
# Update the execution result status to the new state from retry
|
68
|
+
execution_result.status = new_example.execution_result.status
|
69
|
+
|
70
|
+
if execution_result.status == :failed
|
71
|
+
# Sets exception when retry failed
|
72
|
+
execution_result.exception = new_example.execution_result.exception
|
73
|
+
end
|
74
|
+
|
75
|
+
result
|
69
76
|
end
|
70
77
|
|
71
78
|
def notify_reporter
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-retryable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ngan Pham
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-core
|