lib/i18n/tests/basics.rb in i18n-1.9.1 vs lib/i18n/tests/basics.rb in i18n-1.10.0
- old
+ new
@@ -3,16 +3,15 @@
module Basics
def teardown
I18n.available_locales = nil
end
- test "available_locales returns the locales stored to the backend by default" do
+ test "available_locales returns the available_locales produced by the backend, by default" do
I18n.backend.store_translations('de', :foo => 'bar')
I18n.backend.store_translations('en', :foo => 'foo')
- assert I18n.available_locales.include?(:de)
- assert I18n.available_locales.include?(:en)
+ assert_equal I18n.available_locales, I18n.backend.available_locales
end
test "available_locales can be set to something else independently from the actual locale data" do
I18n.backend.store_translations('de', :foo => 'bar')
I18n.backend.store_translations('en', :foo => 'foo')
@@ -22,11 +21,10 @@
I18n.available_locales = [:foo, 'bar']
assert_equal [:foo, :bar], I18n.available_locales
I18n.available_locales = nil
- assert I18n.available_locales.include?(:de)
- assert I18n.available_locales.include?(:en)
+ assert_equal I18n.available_locales, I18n.backend.available_locales
end
test "available_locales memoizes when set explicitely" do
I18n.backend.expects(:available_locales).never
I18n.available_locales = [:foo]