AutoImport strategies
obmarg opened this issue · comments
The autoimporting code defined in #10 could possibly have configurable "import strategies":
- We could change the way "parent" fixture modules are found - maybe any fixture module found in the parent directories could be used, instead of just the ones named
fixtures.exs
. This way if anyone wants to change the name of their fixture files they only need to change the call toload_fixture_files
rather than also changing the autoimport rules. - We could also support directories of fixture files somehow. (So any
fixtures.exs
&fixtures/*.exs
files are loaded). - We could use the module name heirarchy instead of the filesystem hiearachy for finding fixtures. So if our test module was
Project.Users.UserTest
we'd pull in any fixtures fromProject.Fixtures
,Project.Users.Fixtures
etc. etc. This could be combined with something similar to suggestion 1.
These aren't neccesarily solid gold plans, just options to think about
Definitely liking the idea of using the module heirarchy to load in fixture files...