Include test support files via elixirc_paths
This commit is contained in:
parent
34eaacdf37
commit
874b0d5eea
2 changed files with 4 additions and 6 deletions
4
mix.exs
4
mix.exs
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue