Sha256: 95931e2a7347eca717696e137ef7130297817be68571a0505d6128cc4b8bd05c

Contents?: true

Size: 552 Bytes

Versions: 3

Compression:

Stored size: 552 Bytes

Contents

module BackupDirectoryHelpers
  def message_as_mbox_entry(options)
    from = fixture("connection")[:username]
    subject = options[:subject]
    body = options[:body]
    body_and_headers = <<-EOT.gsub("\n", "\r\n")
From: #{from}
Subject: #{subject}

#{body}
    EOT

    "From #{from}\n#{body_and_headers}\n"
  end

  def mbox_content(name)
    File.read(mbox_path(name))
  end

  def mbox_path(name)
    File.join(local_backup_path, name + ".mbox")
  end
end

RSpec.configure do |config|
  config.include BackupDirectoryHelpers, type: :feature
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
imap-backup-1.4.2 spec/features/support/backup_directory.rb
imap-backup-1.4.1 spec/features/support/backup_directory.rb
imap-backup-1.4.0 spec/features/support/backup_directory.rb