aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/load_raw_emails.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/load_raw_emails.rb b/spec/support/load_raw_emails.rb
new file mode 100644
index 000000000..db9e2884e
--- /dev/null
+++ b/spec/support/load_raw_emails.rb
@@ -0,0 +1,7 @@
+def load_raw_emails_data
+ raw_emails_yml = File.join(RSpec.configuration.fixture_path, "raw_emails.yml")
+ for raw_email_id in YAML::load_file(raw_emails_yml).map{|k,v| v["id"]} do
+ raw_email = RawEmail.find(raw_email_id)
+ raw_email.data = load_file_fixture("raw_emails/%d.email" % [raw_email_id])
+ end
+end