Skip to content

Commit

Permalink
[wip]
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed Nov 26, 2023
1 parent b78be36 commit 1540688
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
--order=random
--profile
--exclude-pattern 'dummy_app/node_modules/rails_admin/**/*_spec.rb'
-b
10 changes: 9 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,15 @@
example.run_with_retry retry: (ENV['CI'] && RUBY_ENGINE == 'jruby' ? 3 : 2)
end
config.retry_callback = proc do |example|
Capybara.reset! if example.metadata[:js]
attempt = 0
begin
Capybara.reset! if example.metadata[:js]
rescue Ferrum::TimeoutError, Ferrum::NoExecutionContextError
attempt += 1
raise if attempt >= 3
sleep attempt
retry
end
end

config.before(:all) do
Expand Down

0 comments on commit 1540688

Please sign in to comment.