Skip to content

Commit

Permalink
Fix specs for array interpolation
Browse files Browse the repository at this point in the history
It covers full use case now.
Thankfully to ruby-i18n#282 (comment)
  • Loading branch information
Bartuz committed Sep 12, 2015
1 parent 5045534 commit 16d904b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/i18n/tests/interpolation.rb
Expand Up @@ -55,8 +55,8 @@ module Interpolation
end

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

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

0 comments on commit 16d904b

Please sign in to comment.