From 4f0fc14d0cb5ec08dfa0acf03f4dfd21d2cde5f7 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sun, 11 Oct 2020 10:40:48 +0200 Subject: [PATCH] Add shellmock_clean to setup method --- tests/commit.bats | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/commit.bats b/tests/commit.bats index 5333cac..2491b05 100644 --- a/tests/commit.bats +++ b/tests/commit.bats @@ -33,9 +33,16 @@ setup() { export INPUT_TAGGING_MESSAGE="" export INPUT_PUSH_OPTIONS="" export INPUT_SKIP_DIRTY_CHECK=false + + skipIfNot "$BATS_TEST_DESCRIPTION" + + if [ -z "$TEST_FUNCTION" ]; then + shellmock_clean + fi } teardown() { + if [ -z "$TEST_FUNCTION" ]; then shellmock_clean fi