mini_i18n 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mini_i18n/version.rb +1 -1
- data/lib/mini_i18n.rb +1 -1
- data/spec/mini_i18n_spec.rb +9 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20636bf9386b74aa7c786890b22b4a185914531e
|
4
|
+
data.tar.gz: 4115ce5559244a91b342ef733e4a7101b4ccfd99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e65114f78f650be2226de898c20fa9185403ea5b20b78c366a318b1bd4d679a4aecbed01584993f67ea60c2ba9c22db827108c1702ced3ff21769563e862ee1
|
7
|
+
data.tar.gz: 53aea95dcf486f55ad2f21cfefc64bbfb9162fbb449b638e456895d6a198132086089d5090e2917b8d1aa71282d688df588ca76b277e504ac56e36e38bff962f
|
data/lib/mini_i18n/version.rb
CHANGED
data/lib/mini_i18n.rb
CHANGED
data/spec/mini_i18n_spec.rb
CHANGED
@@ -6,6 +6,7 @@ RSpec.describe MiniI18n do
|
|
6
6
|
before(:each) do
|
7
7
|
MiniI18n.locale = :en
|
8
8
|
MiniI18n.fallbacks = false
|
9
|
+
MiniI18n.available_locales = [:en, :es, :fr]
|
9
10
|
end
|
10
11
|
|
11
12
|
describe 'load_translations' do
|
@@ -24,6 +25,14 @@ RSpec.describe MiniI18n do
|
|
24
25
|
end
|
25
26
|
end
|
26
27
|
|
28
|
+
describe 'available_locales=' do
|
29
|
+
it 'wraps into an array of strings' do
|
30
|
+
MiniI18n.available_locales = :en
|
31
|
+
|
32
|
+
expect(MiniI18n.available_locales).to eq ["en"]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
27
36
|
describe 'locale' do
|
28
37
|
it 'allows to change locale globally' do
|
29
38
|
MiniI18n.locale = :en
|