aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/email_helpers.rb
diff options
context:
space:
mode:
authorMark Longair <mhl@pobox.com>2013-05-28 14:39:09 +0100
committerMark Longair <mhl@pobox.com>2013-05-28 14:39:09 +0100
commitc248356a8e8a13513827381977b24f7406f96a8c (patch)
treea0b2210c5956d0da8ea534fe8b772cd776087460 /spec/support/email_helpers.rb
parented03c3ef55fd61b9be3578ee0c93767d2c218b53 (diff)
parent011e55bd4acf4f3c9de91c5ed4c646e855f19c24 (diff)
Merge branch 'tmail-to-mail-tests' into rails-3-develop
This merge brings in a number of tests and fixes for the handling of mail under Mail / Rails 3 instead of TMail / Rails 2. Conflicts: config/initializers/alaveteli.rb
Diffstat (limited to 'spec/support/email_helpers.rb')
-rw-r--r--spec/support/email_helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/email_helpers.rb b/spec/support/email_helpers.rb
index 7e98c39f6..252b1f137 100644
--- a/spec/support/email_helpers.rb
+++ b/spec/support/email_helpers.rb
@@ -8,7 +8,7 @@ end
def receive_incoming_mail(email_name, email_to, email_from = 'geraldinequango@localhost')
email_name = file_fixture_name(email_name)
- content = File.read(email_name)
+ content = File.open(email_name, 'rb') { |f| f.read }
content.gsub!('EMAIL_TO', email_to)
content.gsub!('EMAIL_FROM', email_from)
RequestMailer.receive(content)