Include test support files via elixirc_paths
This commit is contained in:
parent
938afccbbe
commit
b53a49eb77
2 changed files with 4 additions and 6 deletions
4
mix.exs
4
mix.exs
|
@ -13,6 +13,7 @@ defmodule JSON.LD.Mixfile do
|
|||
build_embedded: Mix.env == :prod,
|
||||
start_permanent: Mix.env == :prod,
|
||||
deps: deps(),
|
||||
elixirc_paths: elixirc_paths(Mix.env()),
|
||||
|
||||
# Hex
|
||||
package: package(),
|
||||
|
@ -67,4 +68,7 @@ defmodule JSON.LD.Mixfile do
|
|||
{:excoveralls, "~> 0.10", only: :test},
|
||||
]
|
||||
end
|
||||
|
||||
defp elixirc_paths(:test), do: ["lib", "test/support"]
|
||||
defp elixirc_paths(_), do: ["lib"]
|
||||
end
|
||||
|
|
|
@ -1,7 +1 @@
|
|||
ExUnit.start()
|
||||
|
||||
with files = File.ls!("./test/support") do
|
||||
Enum.each files, fn(file) ->
|
||||
Code.require_file "support/#{file}", __DIR__
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue