Sha256: 355e8a061504466a13da199805556bad4a8adf80d16b3b926967b609987080a1
Contents?: true
Size: 1.05 KB
Versions: 10
Compression:
Stored size: 1.05 KB
Contents
require File.dirname(__FILE__) + '/../../spec_helper' describe I18n, "Russian pluralization" do before(:each) do @hash = {} %w(one few many other).each do |key| @hash[key.to_sym] = key end @backend = I18n.backend end it "should pluralize correctly" do @backend.send(:pluralize, :'ru', @hash, 1).should == 'one' @backend.send(:pluralize, :'ru', @hash, 2).should == 'few' @backend.send(:pluralize, :'ru', @hash, 3).should == 'few' @backend.send(:pluralize, :'ru', @hash, 5).should == 'many' @backend.send(:pluralize, :'ru', @hash, 10).should == 'many' @backend.send(:pluralize, :'ru', @hash, 11).should == 'many' @backend.send(:pluralize, :'ru', @hash, 21).should == 'one' @backend.send(:pluralize, :'ru', @hash, 29).should == 'many' @backend.send(:pluralize, :'ru', @hash, 131).should == 'one' @backend.send(:pluralize, :'ru', @hash, 1.31).should == 'other' @backend.send(:pluralize, :'ru', @hash, 2.31).should == 'other' @backend.send(:pluralize, :'ru', @hash, 3.31).should == 'other' end end
Version data entries
10 entries across 10 versions & 2 rubygems