This is one of the functions listed #186 as a candidate for migration from tests/template.bats. I realized it would be helpful to have this function while migrating the assertions from tests/scripts/serve.bats in mbland/custom-links per #181.
This commit contains two additional changes:
It removes the --in-process option from stub_program_in_path. It turns out I wasn't using that option anywhere, and I couldn't make any tests fail because it didn't have an effect anyway, since the run function from Bats always launches its arguments in a new subshell.
restore_program_in_path now strips BATS_TEST_BINDIR from the beginning of PATH.
Coverage increased (+0.002%) to 94.607% when pulling ed09765a9576063c4747ee27e82402c4de83226f on create-fwd-script-#186 into 4e8f5f5e99e1a4e1e7017d958c648ef1b75ea14d on master.
This is one of the functions listed #186 as a candidate for migration from
tests/template.bats
. I realized it would be helpful to have this function while migrating the assertions fromtests/scripts/serve.bats
in mbland/custom-links per #181.This commit contains two additional changes:
It removes the
--in-process
option fromstub_program_in_path
. It turns out I wasn't using that option anywhere, and I couldn't make any tests fail because it didn't have an effect anyway, since therun
function from Bats always launches its arguments in a new subshell.restore_program_in_path
now stripsBATS_TEST_BINDIR
from the beginning ofPATH
.