diff options
author | Rémy Coutable <remy@rymai.me> | 2017-03-09 15:12:28 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-03-13 19:33:17 +0300 |
commit | 1761da5152e460549e0e827990ea4f36d097db33 (patch) | |
tree | 14292fa5edae0e5f7c7e91b605e1fd4e9d782340 /spec/spec_helper.rb | |
parent | 5f7592d53805b18fbbc2a117ab8b4d953b13dbb1 (diff) |
Retry only on feature specs that use JS, on CI
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 068984aee84..ceb3209331f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -57,6 +57,13 @@ RSpec.configure do |config| TestEnv.init end + if ENV['CI'] + # Retry only on feature specs that use JS + config.around :each, :js do |ex| + ex.run_with_retry retry: 3 + end + end + config.around(:each, :caching) do |example| caching_store = Rails.cache Rails.cache = ActiveSupport::Cache::MemoryStore.new if example.metadata[:caching] |