aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/abstract_unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/test/abstract_unit.rb')
-rw-r--r--actionmailer/test/abstract_unit.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb
index ea15709b45..b430dffdf8 100644
--- a/actionmailer/test/abstract_unit.rb
+++ b/actionmailer/test/abstract_unit.rb
@@ -11,8 +11,18 @@ ensure
$VERBOSE = old
end
-
require 'active_support/core_ext/kernel/reporting'
+
+require 'active_support/core_ext/string/encoding'
+if "ruby".encoding_aware?
+ # These are the normal settings that will be set up by Railties
+ # TODO: Have these tests support other combinations of these values
+ silence_warnings do
+ Encoding.default_internal = "UTF-8"
+ Encoding.default_external = "UTF-8"
+ end
+end
+
silence_warnings do
# These external dependencies have warnings :/
require 'text/format'
@@ -67,4 +77,4 @@ end
def restore_delivery_method
ActionMailer::Base.delivery_method = @old_delivery_method
-end \ No newline at end of file
+end