Sha256: 36ee0b60181d6537f4b47c12ed9abe8780ec096e9d3f1c3377a8cded9e068f37
Contents?: true
Size: 818 Bytes
Versions: 3
Compression:
Stored size: 818 Bytes
Contents
module BackupDirectoryHelpers def message_as_mbox_entry(options) from = fixture("connection")[:username] subject = options[:subject] body = options[:body] body_and_headers = <<~BODY From: #{from} Subject: #{subject} #{body} BODY "From #{from}\n#{body_and_headers}\n" end def imap_data(uid_validity, uids) { version: 2, uid_validity: uid_validity, uids: uids } end def mbox_content(name) File.read(mbox_path(name)) end def mbox_path(name) File.join(local_backup_path, "#{name}.mbox") end def imap_path(name) File.join(local_backup_path, "#{name}.imap") end def imap_content(name) File.read(imap_path(name)) end def imap_parsed(name) JSON.parse(imap_content(name), symbolize_names: true) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
imap-backup-6.0.0.rc2 | spec/features/support/backup_directory.rb |
imap-backup-5.2.0 | spec/features/support/backup_directory.rb |
imap-backup-5.1.0 | spec/features/support/backup_directory.rb |