To make the module available in all tests, you need to do 2 things:
- Put it in a file with the extension
.ex. - , ,
elixirc_paths , MyApp.Mixfile.project/0 mix.exs.
, , Phoenix test/support :test Mix env mix.exs:
def project do
[...,
elixirc_paths: elixirc_paths(Mix.env),
...]
end
defp elixirc_paths(:test), do: ["lib", "web", "test/support"]
defp elixirc_paths(_), do: ["lib", "web"]