Include test support files via elixirc_paths

This commit is contained in:
Marcel Otto 2019-06-09 21:48:03 +02:00
parent 34eaacdf37
commit 874b0d5eea
2 changed files with 4 additions and 6 deletions

View file

@ -13,6 +13,7 @@ defmodule RDF.Mixfile do
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
# Hex
package: package(),
@ -75,4 +76,7 @@ defmodule RDF.Mixfile do
{:erlang_term, "~> 1.7", only: :bench},
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
end

View file

@ -1,7 +1 @@
ExUnit.start()
with {:ok, files} = File.ls("./test/support") do
Enum.each files, fn(file) ->
Code.require_file "support/#{file}", __DIR__
end
end