From 913d83dc1897ae7f158b05fbc5bc53b7490aad6b Mon Sep 17 00:00:00 2001 From: ILYA Khlopotov Date: Wed, 16 Mar 2016 09:50:01 -0700 Subject: [PATCH] Support sharing test helpers It is tedious to share test_helpers between different applications. We used to place test helpers modules in the `src` directory of the application but this pollutes the `src` and gets deployed into production. In order to solve this problem we add support for following directories in every application: - test/helpers - a place where you put *.erl files with helper modules - test/include - a place for *.hrl files you want to share --- rebar.config.script | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rebar.config.script b/rebar.config.script index fa6a0265e39..c511243c377 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -82,6 +82,8 @@ AddConfig = [ {deps, lists:map(MakeDep, DepDescs)}, {sub_dirs, ["rel"]}, {lib_dirs, ["src/"]}, + {src_dirs, ["src", "test/helpers"]}, + {i, ["test/include"]}, {erl_opts, [debug_info]}, {eunit_opts, [verbose]}, {plugins, [eunit_plugin]},