Skip to content

Commit 80e27e9

Browse files
Bartuzstereobooster
authored andcommitted
Fix specs for array interpolation
It covers full use case now. Thankfully to #282 (comment)
1 parent 23069aa commit 80e27e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/i18n/tests/interpolation.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ module Interpolation
5555
end
5656

5757
test "interpolation: given an array interpolates each element" do
58-
I18n.backend.store_translations(:en, :array_interpolate => ['Hi', '%{name}'])
59-
assert_equal ['Hi', 'Bartuz'], interpolate(:array_interpolate, :name => 'Bartuz')
58+
I18n.backend.store_translations(:en, :array_interpolate => ['Hi', 'Mr. %{name}', 'or sir %{name}'])
59+
assert_equal ['Hi', 'Mr. Bartuz', 'or sir Bartuz'], interpolate(:array_interpolate, :name => 'Bartuz')
6060
end
6161

6262
test "interpolation: given the translation is in utf-8 it still works" do

0 commit comments

Comments
 (0)