aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-08-22 18:43:31 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2010-08-22 18:43:31 -0300
commit8d1ee434da3348089daa497980d1e24837ee8be6 (patch)
treec6d8daa86c850cc81461738eb6ec6117506bcff3
parentae2c60734a0f71593709608710a0c7507bb8699e (diff)
downloadrails-8d1ee434da3348089daa497980d1e24837ee8be6.tar.gz
rails-8d1ee434da3348089daa497980d1e24837ee8be6.tar.bz2
rails-8d1ee434da3348089daa497980d1e24837ee8be6.zip
Silence warnings for Encoding.default_external= and Encoding.default_internal=
-rw-r--r--actionmailer/test/abstract_unit.rb9
-rw-r--r--actionpack/test/abstract_unit.rb8
-rw-r--r--activesupport/test/abstract_unit.rb9
3 files changed, 18 insertions, 8 deletions
diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb
index d91c81886d..b430dffdf8 100644
--- a/actionmailer/test/abstract_unit.rb
+++ b/actionmailer/test/abstract_unit.rb
@@ -11,15 +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
- 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 23b6330805..869842fc9c 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -12,12 +12,16 @@ $:.unshift(File.dirname(__FILE__) + '/fixtures/alternate_helpers')
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 83b25de332..0382739871 100644
--- a/activesupport/test/abstract_unit.rb
+++ b/activesupport/test/abstract_unit.rb
@@ -10,16 +10,19 @@ end
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' }