From 1842599f1afd3e9a590d5987a7aa6ec1cdd78351 Mon Sep 17 00:00:00 2001 From: gmega Date: Wed, 18 Jun 2025 09:57:35 -0300 Subject: [PATCH] chore: pull out common setup as separate helper --- test/test_helper/common_setup.bash | 7 +++++++ test/test_procmon.bats | 7 ++----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 test/test_helper/common_setup.bash diff --git a/test/test_helper/common_setup.bash b/test/test_helper/common_setup.bash new file mode 100644 index 0000000..9cf41c7 --- /dev/null +++ b/test/test_helper/common_setup.bash @@ -0,0 +1,7 @@ +common_setup() { + bats_require_minimum_version 1.12.0 + load test_helper/bats-support/load + load test_helper/bats-assert/load + + export LIB_SRC="${BATS_TEST_DIRNAME}/../src" +} \ No newline at end of file diff --git a/test/test_procmon.bats b/test/test_procmon.bats index d61ed5f..96a6a9f 100644 --- a/test/test_procmon.bats +++ b/test/test_procmon.bats @@ -1,9 +1,6 @@ setup() { - bats_require_minimum_version 1.12.0 - - export LIB_SRC="${BATS_TEST_DIRNAME}/../src" - load "${BATS_TEST_DIRNAME}/test_helper/bats-support/load.bash" - load "${BATS_TEST_DIRNAME}/test_helper/bats-assert/load.bash" + load test_helper/common_setup + common_setup source "${LIB_SRC}/procmon.bash" }