summaryrefslogtreecommitdiffstats
path: root/features/support/env.rb
diff options
context:
space:
mode:
Diffstat (limited to 'features/support/env.rb')
-rw-r--r--features/support/env.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/features/support/env.rb b/features/support/env.rb
index 685d703..689172e 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -3,6 +3,12 @@ require "#{Dir.pwd}/features/support/extra_hooks.rb"
require 'time'
require 'rspec'
+# Force UTF-8. Ruby will default to the system locale, and if it is
+# non-UTF-8, String-methods will fail when operating on non-ASCII
+# strings.
+Encoding.default_external = Encoding::UTF_8
+Encoding.default_internal = Encoding::UTF_8
+
def fatal_system(str)
unless system(str)
raise StandardError.new("Command exited with #{$?}")