Skip to content

Commit

Permalink
tests: unmock git in test_install_downloads_the_main_version
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed Oct 31, 2023
1 parent 161cff5 commit 870bd4b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/acceptance/install_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ function test_install_downloads_the_given_version() {
}

function test_install_downloads_the_main_version() {
# TODO: Remove this after merging https://github.com/TypedDevs/bashunit/pull/212
function unmock() {
local command=$1
unset -f "$command"
}

mock git "cp -r .. temp"
local install_dir="./lib/bashunit"
local output
Expand All @@ -53,4 +59,6 @@ function test_install_downloads_the_main_version() {
assert_contains "bashunit has been installed in the 'lib' folder" "$output"
assert_file_exists "$install_dir"
assert_equals "$(printf "\e[1m\e[32mbashunit\e[0m - (non-stable) main")" "$("$install_dir" --version)"

unmock git
}

0 comments on commit 870bd4b

Please sign in to comment.