skip ruby PATH test if ruby not installed

pull/1025/head
Yushin Washio 2017-08-17 17:33:56 +05:00
parent a6c91f15a0
commit a4472fedaa
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,10 @@ load ../../plugins/available/ruby.plugin
} }
@test "plugins ruby: PATH includes ~/.gem/ruby/bin" { @test "plugins ruby: PATH includes ~/.gem/ruby/bin" {
if ! which ruby >/dev/null; then
skip 'ruby not installed'
fi
last_path_entry=$(echo $PATH | tr ":" "\n" | tail -1); last_path_entry=$(echo $PATH | tr ":" "\n" | tail -1);
[[ "${last_path_entry}" == "${HOME}"/.gem/ruby/*/bin ]] [[ "${last_path_entry}" == "${HOME}"/.gem/ruby/*/bin ]]
} }