diff options
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8b8fbf6e862..1979347a178 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -74,10 +74,18 @@ RSpec.configure do |config| TestEnv.cleanup end + config.before(:example, :request_store) do + RequestStore.begin! + end + + config.after(:example, :request_store) do + RequestStore.end! + RequestStore.clear! + end + if ENV['CI'] - # Retry only on feature specs that use JS - config.around :each, :js do |ex| - ex.run_with_retry retry: 3 + config.around(:each) do |ex| + ex.run_with_retry retry: 2 end end |