You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defmodule TextMessage do
def send(phone_number, body) do
case Application.get_env(:our_app, :env) do
:test ->
nil
_ ->
ExTwilio.Message.create(%{
body: body,
to: phone_number,
from: our_phone_number
})
end
end
end
Many libraries have :enabled option, so that I could set it to false in test environment, and just use the code without this additional setup. Would it be possible to add here as well?
The text was updated successfully, but these errors were encountered:
I think this would be an excellent place to make use of mocking in your code. Check out this library from the Elixir creators: https://github.com/dashbitco/mox
Hi. Thank you for working on this!
I have a module like this in my code:
Many libraries have :enabled option, so that I could set it to
false
in test environment, and just use the code without this additional setup. Would it be possible to add here as well?The text was updated successfully, but these errors were encountered: