I am building a library which currently has a hard dependency on Ecto. I plan to make this dependency optional in the next version.
The implementation is no problem, but I am struggling thinking about how to test it. I am leaning towards having two independent applications that are only compiled in the test environment: one with Ecto and another without Ecto. This applications would depend on my library itself (maybe with a relative path to the upper directory) and run the required tests.
Would this be a good way to go? Or should I look into another solution?