File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change 1818 it_works_for_cache_backed_features ( fetch_from_store : -> ( key ) { Rack ::Attack . cache . store . fetch ( key ) } )
1919 end
2020
21- describe "ConnectionPool with Dalli::Client as a cache backend" do
22- before do
23- Rack ::Attack . cache . store = ConnectionPool . new { Dalli ::Client . new }
21+ if defined? ( ::ConnectionPool )
22+ describe "ConnectionPool with Dalli::Client as a cache backend" do
23+ before do
24+ Rack ::Attack . cache . store = ConnectionPool . new { Dalli ::Client . new }
25+ end
26+
27+ after do
28+ Rack ::Attack . cache . store . with { |client | client . flush_all }
29+ end
30+
31+ it_works_for_cache_backed_features (
32+ fetch_from_store : -> ( key ) { Rack ::Attack . cache . store . with { |client | client . fetch ( key ) } }
33+ )
2434 end
25-
26- after do
27- Rack ::Attack . cache . store . with { |client | client . flush_all }
28- end
29-
30- it_works_for_cache_backed_features (
31- fetch_from_store : -> ( key ) { Rack ::Attack . cache . store . with { |client | client . fetch ( key ) } }
32- )
3335 end
3436end
You can’t perform that action at this time.
0 commit comments