fix failing tests

* tests failed on a local changes site.yml
* somehow universal_newline leaves \r, so bring back gsub to remove them
This commit is contained in:
Reinier Balt 2014-07-17 14:28:49 +02:00
parent d2a6af63bd
commit 8226be68b3

View file

@ -34,8 +34,8 @@ class MessageGateway < ActionMailer::Base
attachment = todo.attachments.build
# create temp file
tmp = Tempfile.new(['attachment', '.eml'], universal_newline: true)
tmp.write email.raw_source
tmp = Tempfile.new(['attachment', '.eml'], {universal_newline: true})
tmp.write email.raw_source.gsub(/\r/, "")
# add temp file to attachment. paperclip will copy the file to the right location
Rails.logger.info "Saved received email to #{tmp.path}"