diff --git a/test/config/branch_test.exs b/test/config/branch_config_test.exs similarity index 92% rename from test/config/branch_test.exs rename to test/config/branch_config_test.exs index 832fcbf..dd72f0b 100644 --- a/test/config/branch_test.exs +++ b/test/config/branch_config_test.exs @@ -1,4 +1,4 @@ -defmodule GitHooks.Config.BranchTest do +defmodule GitHooks.Config.BranchConfigTest do @moduledoc false use ExUnit.Case, async: false @@ -6,6 +6,12 @@ defmodule GitHooks.Config.BranchTest do alias GitHooks.Config.BranchConfig + setup do + on_exit(fn -> + Application.delete_env(:git_hooks, :current_branch_fn) + end) + end + describe "current_branch_allowed?/0" do test "when current branch is allowed to run for the git hook then current_branch_allowed? function returns true" do Application.put_env(:git_hooks, :current_branch_fn, fn -> {"master\n", 0} end)