aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew White <andrew.white@unboxed.co>2016-11-02 11:44:05 +0000
committerAndrew White <andrew.white@unboxed.co>2016-11-02 16:15:00 +0000
commit21186270288ef3f8816cecf0aad1e1c537493bee (patch)
tree958f07c3123d739f890261cdfcdb8d70764d2ed2
parentb82fa5cd2e39bf400f61478173885d6c0b480384 (diff)
downloadrails-21186270288ef3f8816cecf0aad1e1c537493bee.tar.gz
rails-21186270288ef3f8816cecf0aad1e1c537493bee.tar.bz2
rails-21186270288ef3f8816cecf0aad1e1c537493bee.zip
Fix warning about unset I18n.enforce_available_locales
-rw-r--r--actionmailer/test/abstract_unit.rb3
-rw-r--r--actionpack/test/abstract_unit.rb3
-rw-r--r--activemodel/test/cases/helper.rb3
-rw-r--r--activerecord/test/cases/helper.rb3
-rw-r--r--activeresource/test/abstract_unit.rb3
-rw-r--r--activesupport/test/abstract_unit.rb3
6 files changed, 18 insertions, 0 deletions
diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb
index 0b076e1ff9..0e35a88e9f 100644
--- a/actionmailer/test/abstract_unit.rb
+++ b/actionmailer/test/abstract_unit.rb
@@ -42,6 +42,9 @@ ActiveSupport::Deprecation.debug = true
ActionView::Template.register_template_handler :haml, lambda { |template| "Look its HAML!".inspect }
ActionView::Template.register_template_handler :bak, lambda { |template| "Lame backup".inspect }
+# Disable available locale checks to avoid warnings running the test suite.
+I18n.enforce_available_locales = false
+
FIXTURE_LOAD_PATH = File.expand_path('fixtures', File.dirname(__FILE__))
ActionMailer::Base.view_paths = FIXTURE_LOAD_PATH
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index 74efcba666..7ea2c5f061 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -51,6 +51,9 @@ ActiveSupport::Dependencies.hook!
# Show backtraces for deprecated behavior for quicker cleanup.
ActiveSupport::Deprecation.debug = true
+# Disable available locale checks to avoid warnings running the test suite.
+I18n.enforce_available_locales = false
+
# Register danish language for testing
I18n.backend.store_translations 'da', {}
I18n.backend.store_translations 'pt-BR', {}
diff --git a/activemodel/test/cases/helper.rb b/activemodel/test/cases/helper.rb
index 2e860272a4..84f6a464cd 100644
--- a/activemodel/test/cases/helper.rb
+++ b/activemodel/test/cases/helper.rb
@@ -10,4 +10,7 @@ require 'active_support/core_ext/string/access'
# Show backtraces for deprecated behavior for quicker cleanup.
ActiveSupport::Deprecation.debug = true
+# Disable available locale checks to avoid warnings running the test suite.
+I18n.enforce_available_locales = false
+
require 'test/unit'
diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb
index cf49b125d7..e3374bb36f 100644
--- a/activerecord/test/cases/helper.rb
+++ b/activerecord/test/cases/helper.rb
@@ -17,6 +17,9 @@ require 'support/connection'
# Show backtraces for deprecated behavior for quicker cleanup.
ActiveSupport::Deprecation.debug = true
+# Disable available locale checks to avoid warnings running the test suite.
+I18n.enforce_available_locales = false
+
# Enable Identity Map only when ENV['IM'] is set to "true"
ActiveRecord::IdentityMap.enabled = (ENV['IM'] == "true")
diff --git a/activeresource/test/abstract_unit.rb b/activeresource/test/abstract_unit.rb
index 583fd2afb7..90ca772211 100644
--- a/activeresource/test/abstract_unit.rb
+++ b/activeresource/test/abstract_unit.rb
@@ -13,6 +13,9 @@ require 'setter_trap'
require 'logger'
ActiveResource::Base.logger = Logger.new("#{File.dirname(__FILE__)}/debug.log")
+# Disable available locale checks to avoid warnings running the test suite.
+I18n.enforce_available_locales = false
+
def setup_response
matz_hash = { 'person' => { :id => 1, :name => 'Matz' } }
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb
index c26a48a490..a777708e0c 100644
--- a/activesupport/test/abstract_unit.rb
+++ b/activesupport/test/abstract_unit.rb
@@ -30,6 +30,9 @@ silence_warnings { require 'mocha/setup' }
ENV['NO_RELOAD'] = '1'
require 'active_support'
+# Disable available locale checks to avoid warnings running the test suite.
+I18n.enforce_available_locales = false
+
# Include shims until we get off 1.8.6
require 'active_support/ruby/shim' if RUBY_VERSION < '1.8.7'