i18n 0.6.11 → 0.7.0.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of i18n might be problematic. Click here for more details.

Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +3 -26
  3. data/gemfiles/Gemfile.rails-3.2.x +0 -2
  4. data/gemfiles/Gemfile.rails-3.2.x.lock +5 -9
  5. data/gemfiles/Gemfile.rails-4.0.x +0 -2
  6. data/gemfiles/Gemfile.rails-4.0.x.lock +7 -11
  7. data/gemfiles/Gemfile.rails-4.1.x +0 -2
  8. data/gemfiles/Gemfile.rails-4.1.x.lock +7 -11
  9. data/gemfiles/{Gemfile.rails-3.1.x → Gemfile.rails-master} +1 -3
  10. data/gemfiles/Gemfile.rails-master.lock +40 -0
  11. data/lib/i18n.rb +7 -30
  12. data/lib/i18n/backend/base.rb +0 -1
  13. data/lib/i18n/backend/interpolation_compiler.rb +1 -1
  14. data/lib/i18n/backend/key_value.rb +0 -1
  15. data/lib/i18n/config.rb +16 -6
  16. data/lib/i18n/exceptions.rb +4 -28
  17. data/lib/i18n/version.rb +1 -1
  18. data/test/api/key_value_test.rb +2 -6
  19. data/test/api/memoize_test.rb +2 -6
  20. data/test/api/override_test.rb +2 -3
  21. data/test/backend/cache_test.rb +1 -0
  22. data/test/backend/cascade_test.rb +1 -0
  23. data/test/backend/chain_test.rb +1 -0
  24. data/test/backend/exceptions_test.rb +1 -0
  25. data/test/backend/fallbacks_test.rb +8 -2
  26. data/test/backend/key_value_test.rb +2 -5
  27. data/test/backend/memoize_test.rb +2 -2
  28. data/test/backend/metadata_test.rb +1 -0
  29. data/test/backend/pluralization_test.rb +1 -0
  30. data/test/backend/simple_test.rb +2 -1
  31. data/test/backend/transliterator_test.rb +4 -5
  32. data/test/gettext/api_test.rb +1 -0
  33. data/test/gettext/backend_test.rb +73 -82
  34. data/test/i18n/exceptions_test.rb +0 -15
  35. data/test/i18n/interpolate_test.rb +2 -1
  36. data/test/i18n/load_path_test.rb +1 -0
  37. data/test/i18n_test.rb +35 -0
  38. data/test/locale/fallbacks_test.rb +1 -4
  39. data/test/locale/tag/rfc4646_test.rb +1 -0
  40. data/test/run_all.rb +1 -1
  41. data/test/test_helper.rb +20 -41
  42. metadata +19 -28
  43. data/gemfiles/Gemfile.rails-2.3.x +0 -11
  44. data/gemfiles/Gemfile.rails-2.3.x.lock +0 -30
  45. data/gemfiles/Gemfile.rails-3.0.x +0 -11
  46. data/gemfiles/Gemfile.rails-3.0.x.lock +0 -30
  47. data/gemfiles/Gemfile.rails-3.1.x.lock +0 -30
  48. data/lib/i18n/core_ext/string/interpolate.rb +0 -105
  49. data/test/all.rb +0 -8
  50. data/test/core_ext/string/interpolate_test.rb +0 -99
@@ -1,3 +1,3 @@
1
1
  module I18n
2
- VERSION = "0.6.11"
2
+ VERSION = "0.7.0.beta1"
3
3
  end
@@ -1,7 +1,5 @@
1
1
  require 'test_helper'
2
2
 
3
- I18n::TestCase.setup_rufus_tokyo
4
-
5
3
  class I18nKeyValueApiTest < I18n::TestCase
6
4
  include I18n::Tests::Basics
7
5
  include I18n::Tests::Defaults
@@ -15,14 +13,12 @@ class I18nKeyValueApiTest < I18n::TestCase
15
13
  include I18n::Tests::Localization::Time
16
14
  # include Tests::Api::Localization::Procs
17
15
 
18
- STORE = Rufus::Tokyo::Cabinet.new('*')
19
-
20
16
  def setup
21
- I18n.backend = I18n::Backend::KeyValue.new(STORE)
17
+ I18n.backend = I18n::Backend::KeyValue.new({})
22
18
  super
23
19
  end
24
20
 
25
21
  test "make sure we use the KeyValue backend" do
26
22
  assert_equal I18n::Backend::KeyValue, I18n.backend.class
27
23
  end
28
- end if defined?(Rufus::Tokyo::Cabinet)
24
+ end if I18n::TestCase.key_value?
@@ -27,8 +27,6 @@ class I18nMemoizeBackendWithSimpleApiTest < I18n::TestCase
27
27
  end
28
28
  end
29
29
 
30
- I18n::TestCase.setup_rufus_tokyo
31
-
32
30
  class I18nMemoizeBackendWithKeyValueApiTest < I18n::TestCase
33
31
  include I18n::Tests::Basics
34
32
  include I18n::Tests::Defaults
@@ -47,14 +45,12 @@ class I18nMemoizeBackendWithKeyValueApiTest < I18n::TestCase
47
45
  include I18n::Backend::Memoize
48
46
  end
49
47
 
50
- STORE = Rufus::Tokyo::Cabinet.new('*')
51
-
52
48
  def setup
53
- I18n.backend = MemoizeBackend.new(STORE)
49
+ I18n.backend = MemoizeBackend.new({})
54
50
  super
55
51
  end
56
52
 
57
53
  test "make sure we use the MemoizeBackend backend" do
58
54
  assert_equal MemoizeBackend, I18n.backend.class
59
55
  end
60
- end if defined?(Rufus::Tokyo::Cabinet)
56
+ end if I18n::TestCase.key_value?
@@ -16,9 +16,9 @@ class I18nOverrideTest < I18n::TestCase
16
16
  end
17
17
 
18
18
  def setup
19
+ super
19
20
  @I18n = I18n.dup
20
21
  @I18n.backend = I18n::Backend::Simple.new
21
- super
22
22
  end
23
23
 
24
24
  test "make sure modules can overwrite I18n methods" do
@@ -26,8 +26,7 @@ class I18nOverrideTest < I18n::TestCase
26
26
  @I18n.backend.store_translations('en', :foo => 'bar')
27
27
 
28
28
  assert_equal 'rab', @I18n.translate(:foo, :locale => 'en')
29
- # FIXME: this fails under 1.8.7
30
- # assert_equal 'rab', @I18n.t(:foo, :locale => 'en')
29
+ assert_equal 'rab', @I18n.t(:foo, :locale => 'en')
31
30
  assert_equal 'rab', @I18n.translate!(:foo, :locale => 'en')
32
31
  assert_equal 'rab', @I18n.t!(:foo, :locale => 'en')
33
32
  end
@@ -18,6 +18,7 @@ class I18nBackendCacheTest < I18n::TestCase
18
18
  end
19
19
 
20
20
  def teardown
21
+ super
21
22
  I18n.cache_store = nil
22
23
  end
23
24
 
@@ -6,6 +6,7 @@ class I18nBackendCascadeTest < I18n::TestCase
6
6
  end
7
7
 
8
8
  def setup
9
+ super
9
10
  I18n.backend = Backend.new
10
11
  store_translations(:en, :foo => 'foo', :bar => { :baz => 'baz' })
11
12
  @cascade_options = { :step => 1, :offset => 1, :skip_root => false }
@@ -2,6 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class I18nBackendChainTest < I18n::TestCase
4
4
  def setup
5
+ super
5
6
  @first = backend(:en => {
6
7
  :foo => 'Foo', :formats => { :short => 'short' }, :plural_1 => { :one => '%{count}' }, :dates => {:a => "A"}
7
8
  })
@@ -2,6 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class I18nBackendExceptionsTest < I18n::TestCase
4
4
  def setup
5
+ super
5
6
  I18n.backend = I18n::Backend::Simple.new
6
7
  end
7
8
 
@@ -6,6 +6,7 @@ class I18nBackendFallbacksTranslateTest < I18n::TestCase
6
6
  end
7
7
 
8
8
  def setup
9
+ super
9
10
  I18n.backend = Backend.new
10
11
  store_translations(:en, :foo => 'Foo in :en', :bar => 'Bar in :en', :buz => 'Buz in :en')
11
12
  store_translations(:de, :bar => 'Bar in :de', :baz => 'Baz in :de')
@@ -92,6 +93,7 @@ class I18nBackendFallbacksLocalizeTest < I18n::TestCase
92
93
  end
93
94
 
94
95
  def setup
96
+ super
95
97
  I18n.backend = Backend.new
96
98
  store_translations(:en, :date => { :formats => { :en => 'en' }, :day_names => %w(Sunday) })
97
99
  store_translations(:de, :date => { :formats => { :de => 'de' } })
@@ -123,12 +125,16 @@ class I18nBackendFallbacksWithChainTest < I18n::TestCase
123
125
  include I18n::Backend::Fallbacks
124
126
  end
125
127
 
128
+ class Chain < I18n::Backend::Chain
129
+ include I18n::Backend::Fallbacks
130
+ end
131
+
126
132
  def setup
133
+ super
127
134
  backend = Backend.new
128
135
  backend.store_translations(:de, :foo => 'FOO')
129
136
  backend.store_translations(:'pt-BR', :foo => 'Baz in :pt-BR')
130
- I18n.backend = I18n::Backend::Chain.new(I18n::Backend::Simple.new, backend)
131
- I18n.backend.class.send(:include, I18n::Backend::Fallbacks)
137
+ I18n.backend = Chain.new(I18n::Backend::Simple.new, backend)
132
138
  end
133
139
 
134
140
  test "falls back from de-DE to de when there is no translation for de-DE available" do
@@ -1,10 +1,8 @@
1
1
  require 'test_helper'
2
2
 
3
- I18n::TestCase.setup_rufus_tokyo
4
-
5
3
  class I18nBackendKeyValueTest < I18n::TestCase
6
4
  def setup_backend!(subtree=true)
7
- I18n.backend = I18n::Backend::KeyValue.new(Rufus::Tokyo::Cabinet.new('*'), subtree)
5
+ I18n.backend = I18n::Backend::KeyValue.new({}, subtree)
8
6
  store_translations(:en, :foo => { :bar => 'bar', :baz => 'baz' })
9
7
  end
10
8
 
@@ -42,5 +40,4 @@ class I18nBackendKeyValueTest < I18n::TestCase
42
40
  I18n.t("foo", :raise => true)
43
41
  end
44
42
  end
45
-
46
- end if defined?(Rufus::Tokyo::Cabinet)
43
+ end if I18n::TestCase.key_value?
@@ -1,6 +1,6 @@
1
1
  require 'test_helper'
2
-
3
- require 'backend/simple_test'
2
+ # TODO: change back to "require 'backend/simple'" when dropping support to Ruby 1.8.7.
3
+ require File.expand_path('../simple_test', __FILE__)
4
4
 
5
5
  class I18nBackendMemoizeTest < I18nBackendSimpleTest
6
6
  module MemoizeSpy
@@ -6,6 +6,7 @@ class I18nBackendMetadataTest < I18n::TestCase
6
6
  end
7
7
 
8
8
  def setup
9
+ super
9
10
  I18n.backend = Backend.new
10
11
  store_translations(:en, :foo => 'Hi %{name}')
11
12
  end
@@ -7,6 +7,7 @@ class I18nBackendPluralizationTest < I18n::TestCase
7
7
  end
8
8
 
9
9
  def setup
10
+ super
10
11
  I18n.backend = Backend.new
11
12
  @rule = lambda { |n| n == 1 ? :one : n == 0 || (2..10).include?(n % 100) ? :few : (11..19).include?(n % 100) ? :many : :other }
12
13
  store_translations(:xx, :i18n => { :plural => { :rule => @rule } })
@@ -2,6 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class I18nBackendSimpleTest < I18n::TestCase
4
4
  def setup
5
+ super
5
6
  I18n.backend = I18n::Backend::Simple.new
6
7
  I18n.load_path = [locales_dir + '/en.yml']
7
8
  end
@@ -78,6 +79,6 @@ class I18nBackendSimpleTest < I18n::TestCase
78
79
 
79
80
  test "simple reload_translations: uninitializes the backend" do
80
81
  I18n.backend.reload!
81
- assert_equal I18n.backend.initialized?, false
82
+ assert_equal false, I18n.backend.initialized?
82
83
  end
83
84
  end
@@ -3,6 +3,7 @@ require 'test_helper'
3
3
 
4
4
  class I18nBackendTransliterator < I18n::TestCase
5
5
  def setup
6
+ super
6
7
  I18n.backend = I18n::Backend::Simple.new
7
8
  @proc = lambda { |n| n.upcase }
8
9
  @hash = { "ü" => "ue", "ö" => "oe", "a" => "a" }
@@ -55,11 +56,9 @@ class I18nBackendTransliterator < I18n::TestCase
55
56
  assert_equal "abc#", @transliterator.transliterate("abcſ", "#")
56
57
  end
57
58
 
58
- if RUBY_VERSION >= "1.9"
59
- test "default transliterator raises errors for invalid UTF-8" do
60
- assert_raise ArgumentError do
61
- @transliterator.transliterate("a\x92b")
62
- end
59
+ test "default transliterator raises errors for invalid UTF-8" do
60
+ assert_raise ArgumentError do
61
+ @transliterator.transliterate("a\x92b")
63
62
  end
64
63
  end
65
64
 
@@ -6,6 +6,7 @@ include I18n::Gettext::Helpers
6
6
 
7
7
  class I18nGettextApiTest < I18n::TestCase
8
8
  def setup
9
+ super
9
10
  I18n.locale = :en
10
11
  I18n.backend.store_translations :de, {
11
12
  'Hi Gettext!' => 'Hallo Gettext!',
@@ -2,100 +2,91 @@
2
2
 
3
3
  require 'test_helper'
4
4
 
5
- # apparently Ruby 1.9.1p129 has encoding problems with the gettext po parser
6
- unless RUBY_VERSION == '1.9.1' && RUBY_PATCHLEVEL <= 129
5
+ class I18nGettextBackendTest < I18n::TestCase
6
+ include I18n::Gettext::Helpers
7
7
 
8
- class I18nGettextBackendTest < I18n::TestCase
9
- include I18n::Gettext::Helpers
10
-
11
- class Backend < I18n::Backend::Simple
12
- include I18n::Backend::Gettext
13
- end
14
-
15
- def setup
16
- I18n.backend = Backend.new
17
- I18n.locale = :en
18
- I18n.load_path = ["#{locales_dir}/de.po"]
19
- @old_separator, I18n.default_separator = I18n.default_separator, '|'
20
- end
8
+ class Backend < I18n::Backend::Simple
9
+ include I18n::Backend::Gettext
10
+ end
21
11
 
22
- def teardown
23
- I18n.load_path = nil
24
- I18n.backend = nil
25
- I18n.default_separator = @old_separator
26
- end
12
+ def setup
13
+ super
14
+ I18n.backend = Backend.new
15
+ I18n.locale = :en
16
+ I18n.load_path = ["#{locales_dir}/de.po"]
17
+ I18n.default_separator = '|'
18
+ end
27
19
 
28
- def test_backend_loads_po_file
29
- I18n.backend.send(:init_translations)
30
- assert I18n.backend.send(:translations)[:de][:"Axis"]
31
- end
20
+ def test_backend_loads_po_file
21
+ I18n.backend.send(:init_translations)
22
+ assert I18n.backend.send(:translations)[:de][:"Axis"]
23
+ end
32
24
 
33
- def test_looks_up_a_translation
34
- I18n.locale = :de
35
- assert_equal 'Auto', gettext('car')
36
- end
25
+ def test_looks_up_a_translation
26
+ I18n.locale = :de
27
+ assert_equal 'Auto', gettext('car')
28
+ end
37
29
 
38
- def test_uses_default_translation
39
- assert_equal 'car', gettext('car')
40
- end
30
+ def test_uses_default_translation
31
+ assert_equal 'car', gettext('car')
32
+ end
41
33
 
42
- def test_looks_up_a_namespaced_translation
43
- I18n.locale = :de
44
- assert_equal 'Räderzahl', sgettext('Car|Wheels count')
45
- assert_equal 'Räderzahl', pgettext('Car', 'Wheels count')
46
- assert_equal 'Räderzahl!', pgettext('New car', 'Wheels count')
47
- end
34
+ def test_looks_up_a_namespaced_translation
35
+ I18n.locale = :de
36
+ assert_equal 'Räderzahl', sgettext('Car|Wheels count')
37
+ assert_equal 'Räderzahl', pgettext('Car', 'Wheels count')
38
+ assert_equal 'Räderzahl!', pgettext('New car', 'Wheels count')
39
+ end
48
40
 
49
- def test_uses_namespaced_default_translation
50
- assert_equal 'Wheels count', sgettext('Car|Wheels count')
51
- assert_equal 'Wheels count', pgettext('Car', 'Wheels count')
52
- assert_equal 'Wheels count', pgettext('New car', 'Wheels count')
53
- end
41
+ def test_uses_namespaced_default_translation
42
+ assert_equal 'Wheels count', sgettext('Car|Wheels count')
43
+ assert_equal 'Wheels count', pgettext('Car', 'Wheels count')
44
+ assert_equal 'Wheels count', pgettext('New car', 'Wheels count')
45
+ end
54
46
 
55
- def test_pluralizes_entry
56
- I18n.locale = :de
57
- assert_equal 'Achse', ngettext('Axis', 'Axis', 1)
58
- assert_equal 'Achsen', ngettext('Axis', 'Axis', 2)
59
- end
47
+ def test_pluralizes_entry
48
+ I18n.locale = :de
49
+ assert_equal 'Achse', ngettext('Axis', 'Axis', 1)
50
+ assert_equal 'Achsen', ngettext('Axis', 'Axis', 2)
51
+ end
60
52
 
61
- def test_pluralizes_default_entry
62
- assert_equal 'Axis', ngettext('Axis', 'Axis', 1)
63
- assert_equal 'Axis', ngettext('Axis', 'Axis', 2)
64
- end
53
+ def test_pluralizes_default_entry
54
+ assert_equal 'Axis', ngettext('Axis', 'Axis', 1)
55
+ assert_equal 'Axis', ngettext('Axis', 'Axis', 2)
56
+ end
65
57
 
66
- def test_pluralizes_namespaced_entry
67
- I18n.locale = :de
68
- assert_equal 'Rad', nsgettext('Car|wheel', 'wheels', 1)
69
- assert_equal 'Räder', nsgettext('Car|wheel', 'wheels', 2)
70
- assert_equal 'Rad', npgettext('Car', 'wheel', 'wheels', 1)
71
- assert_equal 'Räder', npgettext('Car', 'wheel', 'wheels', 2)
72
- assert_equal 'Rad!', npgettext('New car', 'wheel', 'wheels', 1)
73
- assert_equal 'Räder!', npgettext('New car', 'wheel', 'wheels', 2)
74
- end
58
+ def test_pluralizes_namespaced_entry
59
+ I18n.locale = :de
60
+ assert_equal 'Rad', nsgettext('Car|wheel', 'wheels', 1)
61
+ assert_equal 'Räder', nsgettext('Car|wheel', 'wheels', 2)
62
+ assert_equal 'Rad', npgettext('Car', 'wheel', 'wheels', 1)
63
+ assert_equal 'Räder', npgettext('Car', 'wheel', 'wheels', 2)
64
+ assert_equal 'Rad!', npgettext('New car', 'wheel', 'wheels', 1)
65
+ assert_equal 'Räder!', npgettext('New car', 'wheel', 'wheels', 2)
66
+ end
75
67
 
76
- def test_pluralizes_namespaced_default_entry
77
- assert_equal 'wheel', nsgettext('Car|wheel', 'wheels', 1)
78
- assert_equal 'wheels', nsgettext('Car|wheel', 'wheels', 2)
79
- assert_equal 'wheel', npgettext('Car', 'wheel', 'wheels', 1)
80
- assert_equal 'wheels', npgettext('Car', 'wheel', 'wheels', 2)
81
- assert_equal 'wheel', npgettext('New car', 'wheel', 'wheels', 1)
82
- assert_equal 'wheels', npgettext('New car', 'wheel', 'wheels', 2)
83
- end
68
+ def test_pluralizes_namespaced_default_entry
69
+ assert_equal 'wheel', nsgettext('Car|wheel', 'wheels', 1)
70
+ assert_equal 'wheels', nsgettext('Car|wheel', 'wheels', 2)
71
+ assert_equal 'wheel', npgettext('Car', 'wheel', 'wheels', 1)
72
+ assert_equal 'wheels', npgettext('Car', 'wheel', 'wheels', 2)
73
+ assert_equal 'wheel', npgettext('New car', 'wheel', 'wheels', 1)
74
+ assert_equal 'wheels', npgettext('New car', 'wheel', 'wheels', 2)
75
+ end
84
76
 
85
- def test_pluralizes_namespaced_entry_with_alternative_syntax
86
- I18n.locale = :de
87
- assert_equal 'Rad', nsgettext(['Car|wheel', 'wheels'], 1)
88
- assert_equal 'Räder', nsgettext(['Car|wheel', 'wheels'], 2)
89
- assert_equal 'Rad', npgettext('Car', ['wheel', 'wheels'], 1)
90
- assert_equal 'Räder', npgettext('Car', ['wheel', 'wheels'], 2)
91
- assert_equal 'Rad!', npgettext('New car', ['wheel', 'wheels'], 1)
92
- assert_equal 'Räder!', npgettext('New car', ['wheel', 'wheels'], 2)
93
- end
77
+ def test_pluralizes_namespaced_entry_with_alternative_syntax
78
+ I18n.locale = :de
79
+ assert_equal 'Rad', nsgettext(['Car|wheel', 'wheels'], 1)
80
+ assert_equal 'Räder', nsgettext(['Car|wheel', 'wheels'], 2)
81
+ assert_equal 'Rad', npgettext('Car', ['wheel', 'wheels'], 1)
82
+ assert_equal 'Räder', npgettext('Car', ['wheel', 'wheels'], 2)
83
+ assert_equal 'Rad!', npgettext('New car', ['wheel', 'wheels'], 1)
84
+ assert_equal 'Räder!', npgettext('New car', ['wheel', 'wheels'], 2)
85
+ end
94
86
 
95
- def test_ngettextpluralizes_entry_with_dots
96
- I18n.locale = :de
97
- assert_equal 'Auf 1 Achse.', n_("On %{count} wheel.", "On %{count} wheels.", 1)
98
- assert_equal 'Auf 2 Achsen.', n_("On %{count} wheel.", "On %{count} wheels.", 2)
99
- end
87
+ def test_ngettextpluralizes_entry_with_dots
88
+ I18n.locale = :de
89
+ assert_equal 'Auf 1 Achse.', n_("On %{count} wheel.", "On %{count} wheels.", 1)
90
+ assert_equal 'Auf 2 Achsen.', n_("On %{count} wheel.", "On %{count} wheels.", 2)
100
91
  end
101
92
  end
@@ -27,21 +27,6 @@ class I18nExceptionsTest < I18n::TestCase
27
27
  end
28
28
  end
29
29
 
30
- test "MissingTranslationData html_message is a span with the titlelized last key token" do
31
- exception = I18n::MissingTranslationData.new(:de, :foo, :scope => :bar)
32
- assert_equal '<span class="translation_missing" title="translation missing: de.bar.foo">Foo</span>', exception.html_message
33
- end
34
-
35
- test "MissingTranslationData html_message html escapes key names" do
36
- exception = I18n::MissingTranslationData.new(:de, '<script>Evil</script>', :scope => '<iframe src="example.com" />')
37
- assert_equal '<span class="translation_missing" title="translation missing: de.&lt;iframe src=&quot;example.com&quot; /&gt;.&lt;script&gt;Evil&lt;/script&gt;">&lt;Script&gt;Evil&lt;/Script&gt;</span>', exception.html_message
38
- end
39
-
40
- test "ExceptionHandler returns the html_message if :rescue_format => :html was given" do
41
- message = force_missing_translation_data(:rescue_format => :html)
42
- assert_equal '<span class="translation_missing" title="translation missing: de.bar.foo">Foo</span>', message
43
- end
44
-
45
30
  test "InvalidPluralizationData stores entry and count" do
46
31
  force_invalid_pluralization_data do |exception|
47
32
  assert_equal [:bar], exception.entry
@@ -1,5 +1,4 @@
1
1
  require 'test_helper'
2
- require 'i18n/core_ext/string/interpolate'
3
2
 
4
3
  # thanks to Masao's String extensions, some tests taken from Masao's tests
5
4
  # http://github.com/mutoh/gettext/blob/edbbe1fa8238fa12c7f26f2418403015f0270e47/test/test_string.rb
@@ -62,6 +61,7 @@ end
62
61
 
63
62
  class I18nMissingInterpolationCustomHandlerTest < I18n::TestCase
64
63
  def setup
64
+ super
65
65
  @old_handler = I18n.config.missing_interpolation_argument_handler
66
66
  I18n.config.missing_interpolation_argument_handler = lambda do |key, values, string|
67
67
  "missing key is #{key}, values are #{values.inspect}, given string is '#{string}'"
@@ -70,6 +70,7 @@ class I18nMissingInterpolationCustomHandlerTest < I18n::TestCase
70
70
 
71
71
  def teardown
72
72
  I18n.config.missing_interpolation_argument_handler = @old_handler
73
+ super
73
74
  end
74
75
 
75
76
  test "String interpolation can use custom missing interpolation handler" do