aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-05-15 13:26:50 +0100
committerLouise Crow <louise.crow@gmail.com>2015-05-15 13:26:50 +0100
commit576b58803635de9d16dd7cd1c2a68b692ba11743 (patch)
treebfddbeaad716b5eeabebb0dc28e11370ba7f89f0 /spec/support
parent7d9de8a5ffe67e6bc49271a082c1d8e43dbb0f03 (diff)
Add source file encoding for all ruby files.
This is important under ruby 1.9 in order to determine the encoding that will be used for new strings created in the code in the file.
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/email_helpers.rb1
-rw-r--r--spec/support/load_file_fixtures.rb1
-rw-r--r--spec/support/xapian_index.rb1
3 files changed, 3 insertions, 0 deletions
diff --git a/spec/support/email_helpers.rb b/spec/support/email_helpers.rb
index 252b1f137..8f2abdbfa 100644
--- a/spec/support/email_helpers.rb
+++ b/spec/support/email_helpers.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
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
diff --git a/spec/support/load_file_fixtures.rb b/spec/support/load_file_fixtures.rb
index a54505e99..4370a1b3d 100644
--- a/spec/support/load_file_fixtures.rb
+++ b/spec/support/load_file_fixtures.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
def file_fixture_name(file_name)
return File.join(RSpec.configuration.fixture_path, "files", file_name)
end
diff --git a/spec/support/xapian_index.rb b/spec/support/xapian_index.rb
index 344c28ebb..bfdffd281 100644
--- a/spec/support/xapian_index.rb
+++ b/spec/support/xapian_index.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# Rebuild the current xapian index
def rebuild_xapian_index(terms = true, values = true, texts = true, dropfirst = true)
if dropfirst