From 1ddec65d56dbc92d0391f563d8c725f49386562f Mon Sep 17 00:00:00 2001 From: John D Pell Date: Mon, 31 Jan 2022 11:08:26 -0800 Subject: [PATCH] test/helpers: adopt newly revamped `setup()` --- test/lib/helpers.bats | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) mode change 100755 => 100644 test/lib/helpers.bats diff --git a/test/lib/helpers.bats b/test/lib/helpers.bats old mode 100755 new mode 100644 index 8c340c58..38a917fe --- a/test/lib/helpers.bats +++ b/test/lib/helpers.bats @@ -1,21 +1,15 @@ -#!/usr/bin/env bats +# shellcheck shell=bats -load ../test_helper -load ../test_helper_libs -load ../../plugins/available/base.plugin -load ../../lib/colors +load "${MAIN_BASH_IT_DIR?}/test/test_helper.bash" -function local_setup { - setup_test_fixture +function local_setup_file() { + setup_libs "colors" + load "${BASH_IT?}/plugins/available/base.plugin.bash" +} +function local_setup() { # Copy the test fixture to the Bash-it folder - if command -v rsync &> /dev/null; then - rsync -a "$BASH_IT/test/fixtures/bash_it/" "$BASH_IT/" - else - find "$BASH_IT/test/fixtures/bash_it" \ - -mindepth 1 -maxdepth 1 \ - -exec cp -r {} "$BASH_IT/" \; - fi + cp -RP "$BASH_IT/test/fixtures/bash_it"/* "$BASH_IT/" } # TODO Create global __is_enabled function