diff --git a/spec/acceptance/stores/active_support_mem_cache_store_pooled_spec.rb b/spec/acceptance/stores/active_support_mem_cache_store_pooled_spec.rb index a04cedab..046919a7 100644 --- a/spec/acceptance/stores/active_support_mem_cache_store_pooled_spec.rb +++ b/spec/acceptance/stores/active_support_mem_cache_store_pooled_spec.rb @@ -7,7 +7,11 @@ describe "ActiveSupport::Cache::MemCacheStore (pooled) as a cache backend" do before do - Rack::Attack.cache.store = ActiveSupport::Cache::MemCacheStore.new(pool_size: 2) + Rack::Attack.cache.store = if ActiveSupport.gem_version >= Gem::Version.new("7.2.0") + ActiveSupport::Cache::MemCacheStore.new(pool: true) + else + ActiveSupport::Cache::MemCacheStore.new(pool_size: 2) + end end after do diff --git a/spec/acceptance/stores/active_support_redis_cache_store_pooled_spec.rb b/spec/acceptance/stores/active_support_redis_cache_store_pooled_spec.rb index 3da658f6..29947381 100644 --- a/spec/acceptance/stores/active_support_redis_cache_store_pooled_spec.rb +++ b/spec/acceptance/stores/active_support_redis_cache_store_pooled_spec.rb @@ -13,7 +13,11 @@ describe "ActiveSupport::Cache::RedisCacheStore (pooled) as a cache backend" do before do - Rack::Attack.cache.store = ActiveSupport::Cache::RedisCacheStore.new(pool_size: 2) + Rack::Attack.cache.store = if ActiveSupport.gem_version >= Gem::Version.new("7.2.0") + ActiveSupport::Cache::RedisCacheStore.new(pool: true) + else + ActiveSupport::Cache::RedisCacheStore.new(pool_size: 2) + end end after do