Skip to content

Commit

Permalink
Demonstrate the issue with --seed=50992
Browse files Browse the repository at this point in the history
Which is not related to my other branch in any way
  • Loading branch information
julik committed Nov 12, 2014
1 parent c686d44 commit 6d12187
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/i18n_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ def call(exception, locale, key, options); key; end

test 'I18n.reload! reloads the set of locales that are enforced' do
begin
I18n.available_locales = [:en, :nl] # Because some test clobbers this with --seed=50992

I18n.enforce_available_locales = true

assert_raise(I18n::InvalidLocale) { I18n.default_locale = :de }
Expand All @@ -406,7 +408,11 @@ def call(exception, locale, key, options); key; end
store_translations(:en, :foo => 'Foo in :en')
store_translations(:de, :foo => 'Foo in :de')
store_translations(:pl, :foo => 'Foo in :pl')


assert I18n.available_locales.include?(:de), ":de should now be allowed"
assert I18n.available_locales.include?(:en), ":en should now be allowed"
assert I18n.available_locales.include?(:pl), ":pl should now be allowed"

assert_nothing_raised { I18n.default_locale = I18n.locale = :en }
assert_nothing_raised { I18n.default_locale = I18n.locale = :de }
assert_nothing_raised { I18n.default_locale = I18n.locale = :pl }
Expand Down

0 comments on commit 6d12187

Please sign in to comment.