-
-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathbashunit_test.sh
More file actions
20 lines (16 loc) · 706 Bytes
/
bashunit_test.sh
File metadata and controls
20 lines (16 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
set -euo pipefail
function set_up_before_script() {
TEST_ENV_FILE="tests/acceptance/fixtures/.env.default"
}
function test_bashunit_should_display_version() {
local fixture
fixture=$(printf "\e[1m\e[32mbashunit\e[0m - %s" "$BASHUNIT_VERSION")
todo "Add snapshots with regex to assert this test (part of the output changes every version)"
assert_contains "$fixture" "$(./bashunit --env "$TEST_ENV_FILE" --version)"
assert_successful_code "$(./bashunit --env "$TEST_ENV_FILE" --version)"
}
function test_bashunit_should_display_help() {
assert_match_snapshot "$(./bashunit --env "$TEST_ENV_FILE" --help)"
assert_successful_code "$(./bashunit --env "$TEST_ENV_FILE" --help)"
}