From b95fd6fdcec58755d7249ba86eec7fbf97eda219 Mon Sep 17 00:00:00 2001 From: Nils Winkler Date: Mon, 15 May 2017 07:29:06 +0200 Subject: [PATCH] Checking config file per OS type --- test/install/install.bats | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/install/install.bats b/test/install/install.bats index fcabe691..405519bf 100644 --- a/test/install/install.bats +++ b/test/install/install.bats @@ -3,6 +3,16 @@ load ../test_helper 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 { mkdir -p $BASH_IT lib_directory="$(cd "$(dirname "$0")" && pwd)" @@ -29,10 +39,9 @@ function local_teardown { } @test "install: run the install script silently" { - skip "Waiting for test to be implemented" cd "$BASH_IT" ./install.sh --silent - [ -e "$BASH_IT_TEST_HOME/.bash_profile" ] + [ -e "$BASH_IT_TEST_HOME/$BASH_IT_CONFIG_FILE" ] }