elixir-book icon indicating copy to clipboard operation
elixir-book copied to clipboard

undefined function teardown/2

Open NigelThorne opened this issue 7 years ago • 0 comments

I was running an example.

ExUnit.start

defmodule CallbacksTest do
  use ExUnit.Case, async: true

  setup do
    IO.puts "This is a setup callback"
    { :ok, from_setup: :hello }
  end

  test "the truth", meta do
    assert meta[:from_setup] == :hello
  end

  teardown meta do
    assert meta[:from_setup] == :hello
    :ok
  end
end

I get

** (CompileError) test.el:15: undefined function teardown/2

I guess the api has chnged?

NigelThorne avatar Jul 04 '17 09:07 NigelThorne