Sha256: ae0d07f2ed5bf833ee3d0fad96b5e7eb6c7503544c1f576d3f7e0d9b56d5f68b
Contents?: true
Size: 597 Bytes
Versions: 16
Compression:
Stored size: 597 Bytes
Contents
# encoding: UTF-8 # Copyright 2012 Twitter, Inc # http://www.apache.org/licenses/LICENSE-2.0 require 'spec_helper' include TwitterCldr::Formatters describe PercentFormatter do before(:each) do @formatter = PercentFormatter.new(:locale => :da) end it "should format the number correctly" do @formatter.format(12).should == "12 %" end it "should format negative numbers correctly" do @formatter.format(-12).should == "-12 %" end it "should respect the :precision option" do @formatter.format(-12, :precision => 3).should match_normalized("-12,000 %") end end
Version data entries
16 entries across 16 versions & 1 rubygems