whitfin / cachex

A powerful caching library for Elixir with support for transactions, fallbacks and expirations
https://hexdocs.pm/cachex/
MIT License
1.61k stars 105 forks source link

Refactor test modules and naming conventions #356

Closed whitfin closed 2 months ago

whitfin commented 2 months ago

This PR will refactor a bunch of the test modules to load in a better way, with better logical layout in the test directory. I don't really know what I was thinking when I set it up the first time 😄

The short story is that CachexCase is now replaced by Cachex.Test.Case, and all test code lives in a new Cachex.Test umbrella (not shipped with the library, of course). I managed to remove TestHelper and bake it into the default Cachex.Test.Helper so there's no longer a module definition warning on start. I'm not sure if this is backwards compatible... we'll see.

I might rename Helper to Utils, to avoid confusion with test_helper.exs. This would be Cachex.Test.Utils and probably re-aliases to TestUtils within Cachex.Test.Case for convenience.