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 a85d450
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/acceptance/cache_store_config_with_rails_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

it "works when Rails.cache is set" do
Object.stub_const(:Rails, OpenStruct.new(cache: ActiveSupport::Cache::MemoryStore.new)) do
Rack::Attack.instance_variable_set(:@cache, nil)

get "/", {}, "REMOTE_ADDR" => "1.2.3.4"

assert_equal 200, last_response.status
Expand Down

0 comments on commit a85d450

Please sign in to comment.