rspec-retryable 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 236247a97d1e78fbff8c640dfe567b9c47bca7b72dd05e54edc3d6456cf4e412
4
- data.tar.gz: ee51a9030277de2b6cfb3aa7e6be7cd44bb5a2acafe1ed7d7bba6b9d61e0b85c
3
+ metadata.gz: 74425f47885aa36a1b21e33fd7d063010cc492b5e25162c402758baf526831dd
4
+ data.tar.gz: 384f1dc2b0f850a0383ddd3e0e793eada3c16c47ea2157d5bfe61a1aaf18a433
5
5
  SHA512:
6
- metadata.gz: ab64dc3ef170cf3dd8b2dccf555eb16156c5cf84dce5b269fd81ff9a55213985d3e2aba57e4f7819c2f3b1eead695544c7fb6c4a4c1d707c2d3aabf93c6573ff
7
- data.tar.gz: e49515cbf957ed1ebdfcb0e7ba3b6f6415e01d70b0ca5a36801f55e7035ac9555395200af71f3bafe608b64cd9784bc7c20a8cb2408618b5ae32135e54338971
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
@@ -11,6 +11,10 @@ module RSpec
11
11
  @handlers << klass.new(*args, **kwargs)
12
12
  end
13
13
 
14
+ def reset!
15
+ @handlers.clear
16
+ end
17
+
14
18
  def invoke(payload)
15
19
  traverse(0, payload)
16
20
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module Retryable
5
- VERSION = "0.2.0"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
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.2.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-03 00:00:00.000000000 Z
11
+ date: 2024-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core