mbland / go-script-bash

Framework for writing modular, discoverable, testable Bash scripts
ISC License
96 stars 16 forks source link

bats/helpers: Add create_forwarding_script #192

Closed mbland closed 7 years ago

mbland commented 7 years ago

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.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.002%) to 94.607% when pulling ed09765a9576063c4747ee27e82402c4de83226f on create-fwd-script-#186 into 4e8f5f5e99e1a4e1e7017d958c648ef1b75ea14d on master.