everythingbehind-i18n 0.1.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/i18n.gemspec +1 -1
- data/lib/i18n/backend/simple.rb +1 -1
- data/lib/i18n/test_helper.rb +1 -1
- data/lib/i18n.rb +2 -2
- data/test/i18n_test.rb +2 -2
- data/test/i18n_test_helper_test.rb +0 -9
- data/test/simple_backend_test.rb +3 -3
- metadata +1 -1
data/i18n.gemspec
CHANGED
data/lib/i18n/backend/simple.rb
CHANGED
data/lib/i18n/test_helper.rb
CHANGED
@@ -2,7 +2,7 @@ module I18n
|
|
2
2
|
module TestHelper
|
3
3
|
def assert_all_locales_have_translations_available_to_the_default_locale(message = "All translations should be available in all locales")
|
4
4
|
default_locale = I18n.default_locale.to_sym
|
5
|
-
locales_to_check = I18n.
|
5
|
+
locales_to_check = I18n.locales - [default_locale]
|
6
6
|
|
7
7
|
required_translations = I18n.available_translations(default_locale)
|
8
8
|
|
data/lib/i18n.rb
CHANGED
data/test/i18n_test.rb
CHANGED
@@ -62,8 +62,8 @@ class I18nTest < Test::Unit::TestCase
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def test_delegates_locales_to_backend
|
65
|
-
I18n.backend.expects(:
|
66
|
-
I18n.
|
65
|
+
I18n.backend.expects(:locales)
|
66
|
+
I18n.locales
|
67
67
|
end
|
68
68
|
|
69
69
|
def test_delegates_translate_to_backend
|
data/test/simple_backend_test.rb
CHANGED
@@ -109,9 +109,9 @@ class I18nSimpleBackendTranslationsTest < Test::Unit::TestCase
|
|
109
109
|
def test_list_of_locales
|
110
110
|
@backend.store_translations :'en', :foo => {:bar => 'bar'}
|
111
111
|
@backend.store_translations :'fr', :foo => {:bar => 'baz'}
|
112
|
-
assert_equal 2, @backend.
|
113
|
-
assert @backend.
|
114
|
-
assert @backend.
|
112
|
+
assert_equal 2, @backend.locales.length
|
113
|
+
assert @backend.locales.include?(:en)
|
114
|
+
assert @backend.locales.include?(:fr)
|
115
115
|
end
|
116
116
|
|
117
117
|
def test_store_translations_deep_merges_translations
|