Skip to content

Commit

Permalink
Clear cache before running test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jul 25, 2023
1 parent ac5bae9 commit fe42809
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/acceptance/cache_store_config_with_rails_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
Rack::Attack.throttle("by ip", limit: 1, period: 60) do |request|
request.ip
end

Rack::Attack.instance_variable_set(:@cache, nil)
end

after do
Rack::Attack.instance_variable_set(:@cache, nil)
end

it "fails when Rails.cache is not set" do
Expand Down

0 comments on commit fe42809

Please sign in to comment.