aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-07-23 17:40:44 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-07-23 17:40:44 -0300
commitcd7d414e48f537278043bfc77cfb4217e8c89c24 (patch)
tree24e1adf269ec4e4b38532204d52105e70c7afc1d /railties/test/application
parentaf216b743199f5179e20d0aa536fac5d44067969 (diff)
downloadrails-cd7d414e48f537278043bfc77cfb4217e8c89c24.tar.gz
rails-cd7d414e48f537278043bfc77cfb4217e8c89c24.tar.bz2
rails-cd7d414e48f537278043bfc77cfb4217e8c89c24.zip
Do not set enforce_available_locales to i18n 0.7
Now the default is always true. Users still can set it using config.i18n.enforce_available_locales.
Diffstat (limited to 'railties/test/application')
-rw-r--r--railties/test/application/initializers/i18n_test.rb20
1 files changed, 2 insertions, 18 deletions
diff --git a/railties/test/application/initializers/i18n_test.rb b/railties/test/application/initializers/i18n_test.rb
index bc34897cdf..9ee54796a4 100644
--- a/railties/test/application/initializers/i18n_test.rb
+++ b/railties/test/application/initializers/i18n_test.rb
@@ -184,28 +184,13 @@ en:
assert_fallbacks ca: [:ca, :"es-ES", :es, :'en-US', :en]
end
- test "config.i18n.enforce_available_locales is set to true by default and avoids I18n warnings" do
- add_to_config <<-RUBY
- config.i18n.default_locale = :it
- RUBY
-
- output = capture(:stderr) { load_app }
- assert_no_match %r{deprecated.*enforce_available_locales}, output
- assert_equal true, I18n.enforce_available_locales
-
- assert_raise I18n::InvalidLocale do
- I18n.locale = :es
- end
- end
-
test "disable config.i18n.enforce_available_locales" do
add_to_config <<-RUBY
config.i18n.enforce_available_locales = false
config.i18n.default_locale = :fr
RUBY
- output = capture(:stderr) { load_app }
- assert_no_match %r{deprecated.*enforce_available_locales}, output
+ load_app
assert_equal false, I18n.enforce_available_locales
assert_nothing_raised do
@@ -220,8 +205,7 @@ en:
config.i18n.default_locale = :fr
RUBY
- output = capture(:stderr) { load_app }
- assert_no_match %r{deprecated.*enforce_available_locales}, output
+ load_app
assert_equal false, I18n.enforce_available_locales
assert_nothing_raised do