From 4075d5a70a6e08c1d55e97dbfc13fda4a2faaf84 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Tue, 13 Dec 2011 17:27:39 +0000 Subject: Further improvements to attachment caching --- spec/spec_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/spec_helper.rb') diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e5a42f1a9..5c5cd9a7f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -78,6 +78,7 @@ def load_file_fixture(file_name) end def rebuild_xapian_index(terms = true, values = true, texts = true, dropfirst = true) + parse_all_incoming_messages if dropfirst begin ActsAsXapian.readable_init @@ -168,3 +169,7 @@ def load_raw_emails_data(raw_emails) end raw_email.data = load_file_fixture("useless_raw_email.email") end + +def parse_all_incoming_messages + IncomingMessage.find(:all).each{|x| x.parse_raw_email!} +end -- cgit v1.2.3