From b53a49eb77f79898f1b8a7336ed5117aaf78db25 Mon Sep 17 00:00:00 2001 From: Marcel Otto Date: Sun, 9 Jun 2019 21:50:34 +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 b7d7884..f260a5a 100644 --- a/mix.exs +++ b/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 diff --git a/test/test_helper.exs b/test/test_helper.exs index ccf3822..869559e 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -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