Sha256: 34c08782490fca17cc48d974c36916a75453720a1a9324c8c94d20758479cb15
Contents?: true
Size: 1.27 KB
Versions: 3
Compression:
Stored size: 1.27 KB
Contents
module Tests module Backend module Api module Pluralization def test_pluralize_given_0_returns_zero_string_if_zero_key_given assert_equal 'zero', I18n.t(:default => { :zero => 'zero' }, :count => 0) end def test_pluralize_given_0_returns_plural_string_if_no_zero_key_given assert_equal 'bars', I18n.t(:default => { :other => 'bars' }, :count => 0) end def test_pluralize_given_1_returns_singular_string assert_equal 'bar', I18n.t(:default => { :one => 'bar' }, :count => 1) end def test_pluralize_given_2_returns_plural_string assert_equal 'bars', I18n.t(:default => { :other => 'bars' }, :count => 2) end def test_pluralize_given_3_returns_plural_string assert_equal 'bars', I18n.t(:default => { :other => 'bars' }, :count => 3) end def test_pluralize_given_nil_returns_the_given_entry assert_equal({ :zero => 'zero' }, I18n.t(:default => { :zero => 'zero' }, :count => nil)) end def test_interpolate_given_incomplete_pluralization_data_raises_invalid_pluralization_data assert_raises(I18n::InvalidPluralizationData){ I18n.t(:default => { :one => 'bar' }, :count => 2) } end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
theoooo-i18n-0.2.0 | test/api/pluralization.rb |
theoooo-i18n-0.2.1 | test/api/pluralization.rb |
theoooo-i18n-0.2.2 | test/api/pluralization.rb |