aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-11-15 12:09:25 +0000
committerLouise Crow <louise.crow@gmail.com>2012-11-15 12:09:25 +0000
commit23e99ffb72361161ef8cff4d0d79efca83326c80 (patch)
tree2c6f863a6a90144b1d648623e58ed92b46b6d771 /spec/spec_helper.rb
parent7412af2865c984dab0b5897d5e2050e0a45f25d3 (diff)
Factor out method for getting a mail object from a fixture file.
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 248dff70e..e6d81540b 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -208,6 +208,10 @@ def load_raw_emails_data
end
end
+def get_fixture_mail(filename)
+ MailHandler.mail_from_raw_email(load_file_fixture(filename))
+end
+
def parse_all_incoming_messages
IncomingMessage.find(:all).each{|x| x.parse_raw_email!}
end