diff --git a/test/plugins/base.plugin.bats b/test/plugins/base.plugin.bats index 07b6afc7..3b21ca7f 100755 --- a/test/plugins/base.plugin.bats +++ b/test/plugins/base.plugin.bats @@ -27,7 +27,6 @@ load ../../plugins/available/base.plugin } @test 'plugins base: pickfrom()' { - mkdir -p $BASH_IT_ROOT stub_file="${BASH_IT_ROOT}/stub_file" printf "l1\nl2\nl3" > $stub_file run pickfrom $stub_file @@ -50,7 +49,6 @@ load ../../plugins/available/base.plugin } @test 'plugins base: buf()' { - mkdir -p $BASH_IT_ROOT declare -r file="${BASH_IT_ROOT}/file" touch $file run buf $file diff --git a/test/test_helper.bash b/test/test_helper.bash index 850b6161..71b3a16c 100644 --- a/test/test_helper.bash +++ b/test/test_helper.bash @@ -13,8 +13,12 @@ if [ "$BASH_IT_ROOT" != "${BASH_IT_TEST_DIR}/root" ]; then export BASH_IT=$BASH_IT_TEST_DIR fi +setup() { + mkdir -p -- "${BASH_IT_ROOT}" +} + teardown() { - rm -rf "$BASH_IT_TEST_DIR" + rm -rf "${BASH_IT_TEST_DIR}" } assert() {