From a4472fedaaf479fb8d2ad071cf8dccd7d563d145 Mon Sep 17 00:00:00 2001 From: Yushin Washio Date: Thu, 17 Aug 2017 17:33:56 +0500 Subject: [PATCH] skip ruby PATH test if ruby not installed --- test/plugins/ruby.plugin.bats | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/plugins/ruby.plugin.bats b/test/plugins/ruby.plugin.bats index b9d9f56c..c5f13733 100755 --- a/test/plugins/ruby.plugin.bats +++ b/test/plugins/ruby.plugin.bats @@ -11,6 +11,10 @@ load ../../plugins/available/ruby.plugin } @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}" == "${HOME}"/.gem/ruby/*/bin ]] }