test/bash_it: adopt newly revamped setup()

This commit is contained in:
John D Pell
2022-02-03 21:37:20 -08:00
committed by John D Pell
parent fd1771d45c
commit de31a308f9

View File

@@ -1,19 +1,11 @@
#!/usr/bin/env bats # shellcheck shell=bats
load ../test_helper load "${MAIN_BASH_IT_DIR?}/test/test_helper.bash"
function local_setup {
setup_test_fixture
function local_setup_file() {
# Copy the test fixture to the Bash-it folder # Copy the test fixture to the Bash-it folder
if command -v rsync &> /dev/null cp -fRP "${BASH_IT?}/test/fixtures/bash_it"/* "${BASH_IT?}/" || true
then # don't load any libraries as the tests here test the *whole* kit
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
} }
@test "bash-it: verify that the test fixture is available" { @test "bash-it: verify that the test fixture is available" {