Improve test setup with test_helper.bash
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
# Load BATS helper libraries
|
||||
load 'test_helper/bats-support/load'
|
||||
load 'test_helper/bats-assert/load'
|
||||
load 'test_helper/bats-file/load'
|
||||
# Load test helper
|
||||
load 'test_helper'
|
||||
|
||||
# Simple test for parse_volume function
|
||||
@test "parse_volume should parse volume string correctly" {
|
||||
|
||||
21
tests/test_helper.bash
Normal file
21
tests/test_helper.bash
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Set the path to the BATS helpers
|
||||
export BATS_HELPER_PATH="${BATS_TEST_DIRNAME}/test_helper"
|
||||
|
||||
# Load BATS helper libraries
|
||||
load "${BATS_HELPER_PATH}/bats-support/load.bash"
|
||||
load "${BATS_HELPER_PATH}/bats-assert/load.bash"
|
||||
load "${BATS_HELPER_PATH}/bats-file/load.bash"
|
||||
|
||||
# Setup function that runs before each test
|
||||
setup() {
|
||||
# Add any test setup code here
|
||||
:
|
||||
}
|
||||
|
||||
# Teardown function that runs after each test
|
||||
teardown() {
|
||||
# Add any test teardown code here
|
||||
:
|
||||
}
|
||||
Reference in New Issue
Block a user