From 21186270288ef3f8816cecf0aad1e1c537493bee Mon Sep 17 00:00:00 2001 From: Andrew White Date: Wed, 2 Nov 2016 11:44:05 +0000 Subject: Fix warning about unset I18n.enforce_available_locales --- actionmailer/test/abstract_unit.rb | 3 +++ actionpack/test/abstract_unit.rb | 3 +++ activemodel/test/cases/helper.rb | 3 +++ activerecord/test/cases/helper.rb | 3 +++ activeresource/test/abstract_unit.rb | 3 +++ activesupport/test/abstract_unit.rb | 3 +++ 6 files changed, 18 insertions(+) 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' -- cgit v1.2.3