SparkPost / elixir-sparkpost

SparkPost client library for Elixir https://developers.sparkpost.com
Apache License 2.0
44 stars 14 forks source link

Prefer Dependency Injection instead of Mocking #13

Open DavidAntaramian opened 8 years ago

DavidAntaramian commented 8 years ago

@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.

richleland commented 8 years ago

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