discourse/spec/lib/svg_sprite
Alan Guo Xiang Tan 80bcbd274e
DEV: Fix flaky test in spec/lib/svg_sprite/svg_sprite_spec.rb (#35673)
We should clean up at the end of each test instead of at the start to
ensure that there aren't any side effects.

In this particular case, `SvgSprite.expire_cache` calls
`DistributedCache#clear` but the cache is only cleared at the end of a
transaction. If we clear the cache in a `before` hook, the cache isn't
actually cleared until the existing transaction for the test has ended.
2025-10-29 13:00:21 +08:00
..
svg_sprite_spec.rb DEV: Fix flaky test in spec/lib/svg_sprite/svg_sprite_spec.rb (#35673) 2025-10-29 13:00:21 +08:00