Is Rack::Attack.reset! supposed to clear .blocklist and .safelist? #563
-
I've been banging my head on this one all afternoon trying to figure out why my tests for Rack::Attack behavior aren't reproducing what I'm expecting. One of my before(:each) do
Rack::Attack.safelist_ip(known_address_block)
Rack::Attack.blocklist_ip(catch_all_block)
end which is fine. The tests thereafter do exactly what they're supposed to do. My other after(:each) do
Rack::Attack.reset!
end at the root of my test suite, being called after every test. What am I missing? Does |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
As it turns out, |
Beta Was this translation helpful? Give feedback.
-
Addressed in #562. |
Beta Was this translation helpful? Give feedback.
As it turns out,
.clear_configuration
is the tool for the job, here. It's not documented, so far as I can tell, so I might submit a PR for the README to include it.