Fixed ruby test for good (hopefully)
parent
3103609640
commit
3f6f1326dc
|
|
@ -5,6 +5,32 @@ load ../../lib/helpers
|
|||
load ../../lib/composure
|
||||
load ../../plugins/available/ruby.plugin
|
||||
|
||||
function local_setup {
|
||||
mkdir -p "$BASH_IT"
|
||||
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
||||
# Use rsync to copy Bash-it to the temp folder
|
||||
# rsync is faster than cp, since we can exclude the large ".git" folder
|
||||
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
|
||||
|
||||
rm -rf "$BASH_IT"/enabled
|
||||
rm -rf "$BASH_IT"/aliases/enabled
|
||||
rm -rf "$BASH_IT"/completion/enabled
|
||||
rm -rf "$BASH_IT"/plugins/enabled
|
||||
|
||||
mkdir -p "$BASH_IT"/enabled
|
||||
mkdir -p "$BASH_IT"/aliases/enabled
|
||||
mkdir -p "$BASH_IT"/completion/enabled
|
||||
mkdir -p "$BASH_IT"/plugins/enabled
|
||||
|
||||
export OLD_PATH="$PATH"
|
||||
export PATH="/usr/bin:/bin:/usr/sbin"
|
||||
}
|
||||
|
||||
function local_teardown {
|
||||
export PATH="$OLD_PATH"
|
||||
unset OLD_PATH
|
||||
}
|
||||
|
||||
@test "plugins ruby: remove_gem is defined" {
|
||||
run type remove_gem
|
||||
assert_line 1 "remove_gem () "
|
||||
|
|
@ -15,6 +41,8 @@ load ../../plugins/available/ruby.plugin
|
|||
skip 'ruby not installed'
|
||||
fi
|
||||
|
||||
load ../../plugins/available/ruby.plugin
|
||||
|
||||
local last_path_entry=$(echo $PATH | tr ":" "\n" | tail -1)
|
||||
[[ "${last_path_entry}" == "${HOME}"/.gem/ruby/*/bin ]]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue