Sha256: da8869f51d5f40ce34182d7107f359463d9cef7f8e7c9d7a7feb067e2777fa03

Contents?: true

Size: 951 Bytes

Versions: 6

Compression:

Stored size: 951 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

describe I18n, "Russian pluralization" do
  before(:each) do
    @hash = {:one => 'вещь', :few => 'вещи', :many => 'вещей', :other => 'вещи'}
    @backend = I18n.backend
  end
  
  it "should pluralize correctly" do
    @backend.send(:pluralize, :'ru-RU', @hash, 1).should == 'вещь'
    @backend.send(:pluralize, :'ru-RU', @hash, 2).should == 'вещи'
    @backend.send(:pluralize, :'ru-RU', @hash, 3).should == 'вещи'
    @backend.send(:pluralize, :'ru-RU', @hash, 5).should == 'вещей'
    @backend.send(:pluralize, :'ru-RU', @hash, 10).should == 'вещей'
    @backend.send(:pluralize, :'ru-RU', @hash, 21).should == 'вещь'
    @backend.send(:pluralize, :'ru-RU', @hash, 29).should == 'вещей'
    @backend.send(:pluralize, :'ru-RU', @hash, 129).should == 'вещей'
    @backend.send(:pluralize, :'ru-RU', @hash, 131).should == 'вещь'
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
yaroslav-russian-0.0.1 spec/i18n/locale/pluralization_spec.rb
yaroslav-russian-0.0.2 spec/i18n/locale/pluralization_spec.rb
yaroslav-russian-0.0.3 spec/i18n/locale/pluralization_spec.rb
russian-0.0.1 spec/i18n/locale/pluralization_spec.rb
russian-0.0.2 spec/i18n/locale/pluralization_spec.rb
russian-0.0.3 spec/i18n/locale/pluralization_spec.rb