Just use the capture log tag to, well, capture the log:

@tag :capture_log
test "this test will log error stuff" do


You can also set it for the whole suite: ExUnit.start(capture_log: true).
If you do so, the log will still be included in error reports.




*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

On Mon, May 23, 2016 at 9:08 PM, Louis Pilfold <[email protected]> wrote:

> Hey Elliot
>
> Could you share the printed notification with us please?
>
> Cheers,
> Louis
>
> On 23 May 2016 at 19:01, Elliot Crosby-McCullough <[email protected]>
> wrote:
> > Hello!
> >
> > I'm testing some GenServers, specifically testing certain behaviours that
> > deliberately cause the GenServer to terminate itself.
> >
> > This is all going well, except the test run outputs a notification about
> the
> > closing process (the GenServer, not the test process) on what I assume is
> > STDERR.  Is there some way to suppress this?
> >
> > It seems to happen whether I start the genserver via `start_link` and
> unlink
> > it or create one without linking.
> >
> > All the best,
> > Elliot
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "elixir-lang-talk" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/elixir-lang-talk/CAD2T2cju977Dm8rC_dgfDaTHacOSGvhryXwgmUZZn1k5vADPww%40mail.gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-talk/CAM-pwt4QmpR0gy_PxnDJ_nxOHUNurquNxNTEpyYVuE4Nwd7%2B1g%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-talk/CAGnRm4%2BrFh4F0dxvAUvfepvJVAnYh5VN-mA-dezKcCCUJQazpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to