diff --git a/test/ham_test.exs b/test/ham_test.exs index 52f037d..6f03136 100644 --- a/test/ham_test.exs +++ b/test/ham_test.exs @@ -1,5 +1,6 @@ defmodule HamTest do use ExUnit.Case, async: true + alias Ham.Test.CustomAccess doctest Ham require Ham diff --git a/test/support/custom_access.ex b/test/support/custom_access.ex new file mode 100644 index 0000000..2c32d89 --- /dev/null +++ b/test/support/custom_access.ex @@ -0,0 +1,13 @@ +defmodule Ham.Test.CustomAccess do + @behaviour Access + + @impl Access + def fetch(_data, _key), do: :wrong + @impl Access + def get_and_update(_data, _key, _function), do: :wrong + + @impl Access + @spec pop(any, any) :: :wrong + def pop(_data, _key), do: :wrong +end + diff --git a/test/support/module.ex b/test/support/module.ex index c298aa2..d2ba5f8 100644 --- a/test/support/module.ex +++ b/test/support/module.ex @@ -241,16 +241,3 @@ defmodule Ham.Test.TestModule do def nospec_fun, do: :ok end - -defmodule CustomAccess do - @behaviour Access - - @impl Access - def fetch(_data, _key), do: :wrong - @impl Access - def get_and_update(_data, _key, _function), do: :wrong - - @impl Access - @spec pop(any, any) :: :wrong - def pop(_data, _key), do: :wrong -end