Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #12 from qhool/rebar_2_1_0_fix
Browse files Browse the repository at this point in the history
Compatibility fix for rebar 2.1.0
  • Loading branch information
José Valim committed Dec 12, 2013
2 parents fb437e2 + 06abb4a commit a064e53
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/rebar_exunit.erl
Expand Up @@ -44,9 +44,17 @@ exunit(Config, _AppFile) ->
Loaded = (App == ok orelse App == {error, {already_loaded, elixir}}),
case Loaded of
true ->
application:start(elixir),
application:start(elixir),
Suite =
%check if rebar_config exports get_global/3 -- changed between rebar 2.0.0 and 2.1.0
case lists:keymember(3,2,proplists:lookup_all(get_global,rebar_config:module_info(exports))) of
true ->
rebar_config:get_global(Config,suite, undefined);
false ->
rebar_config:get_global(suite, undefined)
end,
TestExs =
case rebar_config:get_global(suite, undefined) of
case Suite of
undefined -> rebar_utils:find_files("test", ".*\\.exs\$");
Suite -> [Suite]
end,
Expand Down

0 comments on commit a064e53

Please sign in to comment.