test/helpers: adopt newly revamped `setup()`
parent
425ef3e10a
commit
1ddec65d56
|
|
@ -1,21 +1,15 @@
|
||||||
#!/usr/bin/env bats
|
# shellcheck shell=bats
|
||||||
|
|
||||||
load ../test_helper
|
load "${MAIN_BASH_IT_DIR?}/test/test_helper.bash"
|
||||||
load ../test_helper_libs
|
|
||||||
load ../../plugins/available/base.plugin
|
|
||||||
load ../../lib/colors
|
|
||||||
|
|
||||||
function local_setup {
|
function local_setup_file() {
|
||||||
setup_test_fixture
|
setup_libs "colors"
|
||||||
|
load "${BASH_IT?}/plugins/available/base.plugin.bash"
|
||||||
|
}
|
||||||
|
|
||||||
|
function local_setup() {
|
||||||
# Copy the test fixture to the Bash-it folder
|
# Copy the test fixture to the Bash-it folder
|
||||||
if command -v rsync &> /dev/null; then
|
cp -RP "$BASH_IT/test/fixtures/bash_it"/* "$BASH_IT/"
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO Create global __is_enabled function
|
# TODO Create global __is_enabled function
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue