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 cat <<-\EOF
require 'notmuch' require 'notmuch'
$maildir = ENV['MAIL_DIR'] $maildir = ENV['MAIL_DIR'] || abort('MAIL_DIR not set')
if not $maildir then
abort('environment variable MAIL_DIR must be set')
end
@db = Notmuch::Database.new($maildir) @db = Notmuch::Database.new($maildir)
EOF EOF
cat cat