mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-13 13:31:19 +00:00
13 lines
322 B
Ruby
13 lines
322 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.shared_context 'rack attack cache store' do
|
|
around do |example|
|
|
# Instead of test environment's :null_store so the throttles can increment
|
|
Rack::Attack.cache.store = ActiveSupport::Cache::MemoryStore.new
|
|
|
|
example.run
|
|
|
|
Rack::Attack.cache.store = Rails.cache
|
|
end
|
|
end
|