Skip to content

Commit 16aa61d

Browse files
committed
🔧 minitest-retry
1 parent 17652e0 commit 16aa61d

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.rubocop_gradual.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
[78, 3, 30, "Gemspec/DependencyVersion: Dependency version specification is required.", 2010339150],
2727
[89, 3, 72, "Gemspec/DependencyVersion: Dependency version specification is required.", 2491072344]
2828
],
29-
"test/test_helper.rb:2983051125": [
30-
[195, 45, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560]
29+
"test/test_helper.rb:4156984416": [
30+
[208, 45, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560]
3131
]
3232
}

test/test_helper.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
# External libraries
66
require "minitest/autorun"
77
require "mocha/minitest"
8+
require "minitest/retry"
9+
10+
Minitest::Retry.use!(
11+
retry_count: 3, # The number of times to retry. The default is 3.
12+
verbose: true, # Whether or not to display the message at the time of retry. The default is true.
13+
io: $stdout, # Display destination of retry when the message. The default is stdout.
14+
exceptions_to_retry: [], # List of exceptions that will trigger a retry (when empty, all exceptions will).
15+
methods_to_retry: [
16+
:test_should_authenticate_with_password_and_yubico_otp,
17+
], # List of methods that will trigger a retry (when empty, all methods will).
18+
classes_to_retry: [], # List of classes that will trigger a retry (when empty, all classes will).
19+
methods_to_skip: [], # List of methods that will skip a retry (when empty, all methods will retry).
20+
exceptions_to_skip: [], # List of exceptions that will skip a retry (when empty, all exceptions will retry).
21+
)
822

923
# We have to set up code coverage early because the gem will be required by the Rails test dummy app.
1024
begin

0 commit comments

Comments
 (0)