diff --git a/spec/config/initializers/rack/attack_spec.rb b/spec/config/initializers/rack/attack_spec.rb index 6b3030158a..c2e6615935 100644 --- a/spec/config/initializers/rack/attack_spec.rb +++ b/spec/config/initializers/rack/attack_spec.rb @@ -7,6 +7,8 @@ RSpec.describe Rack::Attack, type: :request do Rails.application end + # kmyblue original fix for test error + def below_limit limit - 1 end @@ -27,6 +29,8 @@ RSpec.describe Rack::Attack, type: :request do described_class.cache.count("#{throttle}:#{discriminator}", period) end + # kmyblue original fix for test error (end) + shared_context 'with throttled endpoint base' do before do # Rack::Attack periods are not rolling, so avoid flaky tests by setting the time in a way