mercredi 30 mars 2016

Phoenix print log when running "mix test"

I'm trying to debug while a test is not running, I have my test and I'm trying to print something so I can see the values of a tuple when mix test is run. I've tried doing this:

require Logger

test "creates element", %{conn: conn} do
    Logger.debug "debugging #{inspect conn}"
    conn = post conn, v1_content_path(conn, :create), content: @valid_attrs
    ...
    ...
end

But nothing is printed! It's driving me nuts! Here is where I read to do what I'm doing How to pretty print conn content?

Aucun commentaire:

Enregistrer un commentaire