Where is the best place to put the bats aka test files? Do you put them in the same directory as the bash scripts you are testing? If you put them in a different directory how do you reference the bash scripts?
Where is the best place to put the bats aka test files? Do you put them in the same directory as the bash scripts you are testing? If you put them in a different directory how do you reference the bash scripts?
To run a script in a different folder, I add the folder to the "run" statement also.
The tested script "post.sh" is in the folder ./scripts and the used test "post.bats" is in the folder ./test, next to the folder with the scripts. I start the tests from the folder where the ./scripts and ./test folder is.