before(:all) do Archive::Zip.archive( "tmp/app.zip", "README.md") end
after(:all) do FileUtils.rm "tmp/app.zip" end
let(:mail) do AppMailer.send_email(zip_path) end
it 'assings the attachment file'do attachment = mail.attachments[0] expect(attachment).to be_a_kind_of(Mail::Part) expect(attachment.content_type).to be_start_with('application/zip') expect(attachment.filename).to eq "app.zip" end end