Move encoding settings for testing purposes to abstract_unit file

This commit is contained in:
Santiago Pastorino 2010-08-21 22:36:51 -03:00
parent 7a090b0216
commit 1d888d465b
2 changed files with 6 additions and 9 deletions

@ -12,8 +12,12 @@
ENV['TMPDIR'] = File.join(File.dirname(__FILE__), 'tmp')
if defined?(Encoding.default_internal)
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
Encoding.default_internal = "UTF-8"
Encoding.default_external = "UTF-8"
end
require 'test/unit'

@ -1,12 +1,5 @@
require "abstract_unit"
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
Encoding.default_internal = "UTF-8"
Encoding.default_external = "UTF-8"
end
class TestERBTemplate < ActiveSupport::TestCase
ERBHandler = ActionView::Template::Handlers::ERB