提交 8d1ee434 编写于 作者: S Santiago Pastorino

Silence warnings for Encoding.default_external= and Encoding.default_internal=

上级 ae2c6073
...@@ -11,15 +11,18 @@ ...@@ -11,15 +11,18 @@
$VERBOSE = old $VERBOSE = old
end end
require 'active_support/core_ext/kernel/reporting'
require 'active_support/core_ext/string/encoding' require 'active_support/core_ext/string/encoding'
if "ruby".encoding_aware? if "ruby".encoding_aware?
# These are the normal settings that will be set up by Railties # These are the normal settings that will be set up by Railties
# TODO: Have these tests support other combinations of these values # TODO: Have these tests support other combinations of these values
Encoding.default_internal = "UTF-8" silence_warnings do
Encoding.default_external = "UTF-8" Encoding.default_internal = "UTF-8"
Encoding.default_external = "UTF-8"
end
end end
require 'active_support/core_ext/kernel/reporting'
silence_warnings do silence_warnings do
# These external dependencies have warnings :/ # These external dependencies have warnings :/
require 'text/format' require 'text/format'
......
...@@ -12,12 +12,16 @@ ...@@ -12,12 +12,16 @@
ENV['TMPDIR'] = File.join(File.dirname(__FILE__), 'tmp') ENV['TMPDIR'] = File.join(File.dirname(__FILE__), 'tmp')
require 'active_support/core_ext/kernel/reporting'
require 'active_support/core_ext/string/encoding' require 'active_support/core_ext/string/encoding'
if "ruby".encoding_aware? if "ruby".encoding_aware?
# These are the normal settings that will be set up by Railties # These are the normal settings that will be set up by Railties
# TODO: Have these tests support other combinations of these values # TODO: Have these tests support other combinations of these values
Encoding.default_internal = "UTF-8" silence_warnings do
Encoding.default_external = "UTF-8" Encoding.default_internal = "UTF-8"
Encoding.default_external = "UTF-8"
end
end end
require 'test/unit' require 'test/unit'
......
...@@ -10,16 +10,19 @@ ...@@ -10,16 +10,19 @@
lib = File.expand_path("#{File.dirname(__FILE__)}/../lib") lib = File.expand_path("#{File.dirname(__FILE__)}/../lib")
$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib) $:.unshift(lib) unless $:.include?('lib') || $:.include?(lib)
require 'active_support/core_ext/kernel/reporting'
require 'active_support/core_ext/string/encoding' require 'active_support/core_ext/string/encoding'
if "ruby".encoding_aware? if "ruby".encoding_aware?
# These are the normal settings that will be set up by Railties # These are the normal settings that will be set up by Railties
# TODO: Have these tests support other combinations of these values # TODO: Have these tests support other combinations of these values
Encoding.default_internal = "UTF-8" silence_warnings do
Encoding.default_external = "UTF-8" Encoding.default_internal = "UTF-8"
Encoding.default_external = "UTF-8"
end
end end
require 'test/unit' require 'test/unit'
require 'active_support/core_ext/kernel/reporting'
require 'empty_bool' require 'empty_bool'
silence_warnings { require 'mocha' } silence_warnings { require 'mocha' }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册