Open Kukunin opened 5 years ago
The workaround is to add these lines to spec_helper.exs
:
Process.unregister(ExUnit.CaptureServer)
{:ok, _} = Application.ensure_all_started(:ex_unit)
@Kukunin just to clarify does adding ex_unit
to your extra_applications not solve this issue? I happen to be using ex_unit
assertions for my specs since I don't believe Espec supports assert_reply
and assert_broadcast
. Might be a cool thing to add in soon.
It doesn't solve since both espec and ex_unit starts ExUnit.CaptureServer
. So whoever starts it second, it crashes with already running
. That's why I do Process.unregister(ExUnit.CaptureServer)
first
I have channel tests using
Phoenix.ChannelTest
which is broken in ESpec and Phoenix 1.4.0.It crashes with:
It happens so, because previosly, they received timeout for
refute_broadcast
function from argument: https://hexdocs.pm/phoenix/1.3.4/Phoenix.ChannelTest.html#refute_broadcast/3, but in 1.4.0, they try to fetch:ex_unit
application, which fails.Also,
:ex_unit
application can't be start because of:since espec starts ExUnit.CaptureServer on its side