elixir icon indicating copy to clipboard operation
elixir copied to clipboard

Failing assertions in ExUnit teardown aren't reported

Open pminten opened this issue 12 years ago • 3 comments

When an assertion fails in a teardown function this is not reported.

How to reproduce

Put this in a file and run it:

ExUnit.start

defmodule TeardownTest do
  use ExUnit.Case

  def teardown do
    assert 1 == 2
  end

  test "foo" do

  end
end

Expected behaviour

An assertion failure being printed.

Observed behaviour

No errors reported, ExUnit says 1 test has succeeded.

pminten avatar Jan 19 '14 12:01 pminten

Behaviour has been observed in current master (c837d8e1d36b8b043bdc646dfa66e9cea8ae2038) and as far back as tag v0.9.0 (didn't look further).

pminten avatar Jan 19 '14 12:01 pminten

Apparently this was a fault on my side, though I'm not exactly sure what it was. Closing this as it isn't an actual bug.

pminten avatar Jan 19 '14 12:01 pminten

teardown and setup should not have assertions.

edgurgel avatar Jan 19 '14 13:01 edgurgel