RSpec.describeAppMailer,type::mailerdobefore(:all)doArchive::Zip.archive("tmp/app.zip","README.md")endafter(:all)doFileUtils.rm"tmp/app.zip"endlet(:mail)doAppMailer.send_email(zip_path)endit'assings the attachment file'doattachment=mail.attachments[0]expect(attachment).tobe_a_kind_of(Mail::Part)expect(attachment.content_type).tobe_start_with('application/zip')expect(attachment.filename).toeq"app.zip"endend