elixir-sparkpost icon indicating copy to clipboard operation
elixir-sparkpost copied to clipboard

Prefer Dependency Injection instead of Mocking

Open DavidAntaramian opened this issue 9 years ago • 1 comments

@richleland As I was going through the requirements for change implementation for #12 I realized that the tests depend significantly on mocking the behaviour of HTTPotion. Moving forward, would you be open to preferring a dependency injection model over mocking? This is the style preferred for Elixir core components (see "Mocks and explicit contracts" – José Valim on Plataformatec Blog).

My thoughts would be to do this once #12 is complete but prior to further development.

DavidAntaramian avatar Feb 27 '16 23:02 DavidAntaramian

Makes sense to me @DavidAntaramian we can tackle this right after #12 as you said.

richleland avatar Feb 28 '16 15:02 richleland