elixir-book
elixir-book copied to clipboard
undefined function teardown/2
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?