aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 5e6d9ec4a..42c5ff6bf 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -13,6 +13,7 @@ config['ADMIN_PASSWORD'] = 'baz'
# tests assume 20 days
config['REPLY_LATE_AFTER_DAYS'] = 20
+
# Uncomment the next line to use webrat's matchers
#require 'webrat/integrations/rspec-rails'
@@ -26,6 +27,7 @@ Spec::Runner.configure do |config|
# in your config/boot.rb
config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
+
# == Fixtures
#
# You can declare fixtures for each example_group like this:
@@ -144,3 +146,12 @@ if $tempfilecount.nil?
puts "WARNING: HTML validation script " + $html_validation_script + " not found"
end
end
+
+def load_raw_emails_data(raw_emails)
+ raw_email = raw_emails(:useless_raw_email)
+ begin
+ raw_email.destroy_file_representation!
+ rescue Errno::ENOENT
+ end
+ raw_email.data = load_file_fixture("useless_raw_email.email")
+end