From 874b0d5eea85abcae69929db04f2c0a45025c337 Mon Sep 17 00:00:00 2001 From: Marcel Otto Date: Sun, 9 Jun 2019 21:48:03 +0200 Subject: [PATCH] Include test support files via elixirc_paths --- mix.exs | 4 ++++ test/test_helper.exs | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mix.exs b/mix.exs index e470371..285bc22 100644 --- a/mix.exs +++ b/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 diff --git a/test/test_helper.exs b/test/test_helper.exs index 7405992..869559e 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -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