File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed
Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 9898group :test do
9999 gem "brakeman" # security inspection
100100 gem "capybara"
101+ gem "rspec-retry" # for retrying flaky tests
101102 gem "capybara-screenshot"
102103 gem "database_cleaner-active_record"
103104 gem "docx"
Original file line number Diff line number Diff line change 472472 rspec-expectations (~> 3.13 )
473473 rspec-mocks (~> 3.13 )
474474 rspec-support (~> 3.13 )
475+ rspec-retry (0.6.2 )
476+ rspec-core (> 3.3 )
475477 rspec-support (3.13.2 )
476478 rspec_junit_formatter (0.6.0 )
477479 rspec-core (>= 2 , < 4 , != 2.12.0 )
@@ -695,6 +697,7 @@ DEPENDENCIES
695697 request_store
696698 rexml
697699 rspec-rails
700+ rspec-retry
698701 rspec_junit_formatter
699702 rswag-api
700703 rswag-specs
Original file line number Diff line number Diff line change 1+ # spec/spec_helper.rb
2+ require 'rspec/retry'
3+
4+ RSpec . configure do |config |
5+ # show retry status in spec process
6+ config . verbose_retry = true
7+ # show exception that triggers a retry if verbose_retry is set to true
8+ config . display_try_failure_messages = true
9+
10+ if ENV [ 'CI' ] == 'true'
11+ # run retry only on features
12+ config . around :each , :js do |ex |
13+ ex . run_with_retry retry : 3
14+ end
15+ end
16+ end
You can’t perform that action at this time.
0 commit comments