Sha256: 5567efd2acaaf39adbd2ae998a023e47ee2a2e5c172d35c1aa4aacdc3be98471

Contents?: true

Size: 625 Bytes

Versions: 48

Compression:

Stored size: 625 Bytes

Contents

require 'spec_helper'
require 'td/helpers'

module TreasureData
  describe 'format_with_delimiter' do
    it "delimits the number with ',' by default" do
      expect(Helpers.format_with_delimiter(0)).to eq("0")
      expect(Helpers.format_with_delimiter(10)).to eq("10")
      expect(Helpers.format_with_delimiter(100)).to eq("100")
      expect(Helpers.format_with_delimiter(1000)).to eq("1,000")
      expect(Helpers.format_with_delimiter(10000)).to eq("10,000")
      expect(Helpers.format_with_delimiter(100000)).to eq("100,000")
      expect(Helpers.format_with_delimiter(1000000)).to eq("1,000,000")
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
td-0.10.83 spec/td/helpers_spec.rb
td-0.10.82 spec/td/helpers_spec.rb
td-0.10.81 spec/td/helpers_spec.rb
td-0.10.79 spec/td/helpers_spec.rb
td-0.10.78 spec/td/helpers_spec.rb
td-0.10.77 spec/td/helpers_spec.rb
td-0.10.76 spec/td/helpers_spec.rb
td-0.10.75 spec/td/helpers_spec.rb