Using IO.puts and IO.inspect in ExUnit tests

By default in the test env, Phoenix doesn't show IO.puts/IO.inspect outputs in the console.

Table of contents

    Debugging without access to these two functions may be a pain in the neck. Fortunately, there is a simple solution, you can apply in just a few seconds.

    Go to your config/test.exs file and you'll probably see:

    # Print only warnings and errors during test
    config :logger, level: :warn

    The only thing you have to do is change it to:

    config :logger,
      backends: [:console],
      compile_time_purge_level: :debug

    After your work, I would recommend you to revert changes.

    Download our ebook
    Oskar Legner
    Oskar Legner Elixir & React Developer

    Read more
    on #curiosum blog

    The little story of Elixir programming language

    The Elixir language, operating on an Erlang machine, is constantly gaining more and more followers. Where can these languages be used? How was Elixir created and what does it have in common with Erlang?

    Top Elixir Learning Media & Resources in 2022

    Regardless of whether you've only just heard of the Elixir programming language and would like to learn it, or if you're a seasoned developer with years of experience, you need adequate learning resources to ensure steady progress in your career - and just equally as important is the need to be up to date with what's new & trending in the functional