diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index d91c81886d8f69d295aef9a5914ff9d85134bb9f..b430dffdf83625aa5bbcf76fef52dece9d3d983c 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -11,15 +11,18 @@ $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 - Encoding.default_internal = "UTF-8" - Encoding.default_external = "UTF-8" + silence_warnings do + Encoding.default_internal = "UTF-8" + Encoding.default_external = "UTF-8" + end end -require 'active_support/core_ext/kernel/reporting' silence_warnings do # These external dependencies have warnings :/ require 'text/format' diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 23b633080588ac2ffe306087874230d3dddfc998..869842fc9c750d4e685a46bf0754e87255ad026a 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -12,12 +12,16 @@ ENV['TMPDIR'] = File.join(File.dirname(__FILE__), 'tmp') +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 - Encoding.default_internal = "UTF-8" - Encoding.default_external = "UTF-8" + silence_warnings do + Encoding.default_internal = "UTF-8" + Encoding.default_external = "UTF-8" + end end require 'test/unit' diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index 83b25de332dc2da80f93dd6643827672eb39432f..038273987148461e1ee1847a803db052ffa65e11 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -10,16 +10,19 @@ lib = File.expand_path("#{File.dirname(__FILE__)}/../lib") $:.unshift(lib) unless $:.include?('lib') || $:.include?(lib) +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 - Encoding.default_internal = "UTF-8" - Encoding.default_external = "UTF-8" + silence_warnings do + Encoding.default_internal = "UTF-8" + Encoding.default_external = "UTF-8" + end end require 'test/unit' -require 'active_support/core_ext/kernel/reporting' require 'empty_bool' silence_warnings { require 'mocha' }