<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 10, 2015 at 5:10 PM, Roberto Ostinelli <span dir="ltr"><<a href="mailto:roberto@widetag.com" target="_blank">roberto@widetag.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Ideally, I would like to define a conditional macro depending on code running in tests or not.</div><div><br></div></blockquote><div><br></div><div>You can probably have a configuration option via application:get_env/2 you can use to make the discrimination. On the top of my head, this is what I would do.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div></div><div>Any ideas welcome!</div></blockquote></div><br></div><div class="gmail_extra">Advice: don't do it. Keep your test artifact equivalent to the deployment artifact. Make the application such that normal configuration parameters can be set in order to make the application work in the test environment. It is safer in the long run because you don't want too many diverging code paths based on the environment it lives in. It is simply too brittle, and that would be my advice.<br></div><div class="gmail_extra"><br><br>-- <br><div class="gmail_signature">J.</div>
</div></div>