test: ruby: simplify MAIL_DIR check

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
Felipe Contreras 2021-05-01 06:59:17 -05:00 committed by David Bremner
parent a75a9a5aed
commit c1b99d6f94

View file

@ -12,10 +12,7 @@ test_ruby() {
(
cat <<-\EOF
require 'notmuch'
$maildir = ENV['MAIL_DIR']
if not $maildir then
abort('environment variable MAIL_DIR must be set')
end
$maildir = ENV['MAIL_DIR'] || abort('MAIL_DIR not set')
@db = Notmuch::Database.new($maildir)
EOF
cat