Checking config file per OS type

pull/974/head
Nils Winkler 2017-05-15 07:29:06 +02:00
parent 6ce9403be0
commit b95fd6fdce
1 changed files with 11 additions and 2 deletions

View File

@ -3,6 +3,16 @@
load ../test_helper load ../test_helper
load ../../lib/composure load ../../lib/composure
# Determine which config file to use based on OS.
case $OSTYPE in
darwin*)
BASH_IT_CONFIG_FILE=.bash_profile
;;
*)
BASH_IT_CONFIG_FILE=.bashrc
;;
esac
function local_setup { function local_setup {
mkdir -p $BASH_IT mkdir -p $BASH_IT
lib_directory="$(cd "$(dirname "$0")" && pwd)" lib_directory="$(cd "$(dirname "$0")" && pwd)"
@ -29,10 +39,9 @@ function local_teardown {
} }
@test "install: run the install script silently" { @test "install: run the install script silently" {
skip "Waiting for test to be implemented"
cd "$BASH_IT" cd "$BASH_IT"
./install.sh --silent ./install.sh --silent
[ -e "$BASH_IT_TEST_HOME/.bash_profile" ] [ -e "$BASH_IT_TEST_HOME/$BASH_IT_CONFIG_FILE" ]
} }