Sha256: 9ff0c561a2b6a186a13e0ccc692c0743d7f0e7beec7497c33623dd93e93e0706
Contents?: true
Size: 852 Bytes
Versions: 5
Compression:
Stored size: 852 Bytes
Contents
// Copyright 2012 Twitter, Inc // http://www.apache.org/licenses/LICENSE-2.0 //= require '../../../build/twitter_cldr_en.js' describe("PluralRules", function() { describe("#all", function() { it("returns an array of all English plural rules", function() { expect(TwitterCldr.PluralRules.all()).toEqual(["one", "other"]); }); }); describe("#rule_for", function() { it("returns 'one' for the number 1", function() { expect(TwitterCldr.PluralRules.rule_for(1)).toEqual("one"); }); it("returns 'other' for any number greater than 1", function() { for (var i = 2; i < 10; i ++) { expect(TwitterCldr.PluralRules.rule_for(i)).toEqual("other"); } }); it("returns 'other' for the number 0", function() { expect(TwitterCldr.PluralRules.rule_for(0)).toEqual("other"); }); }); });
Version data entries
5 entries across 5 versions & 1 rubygems