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.14.1 spec/td/helpers_spec.rb
td-0.14.0 spec/td/helpers_spec.rb
td-0.13.2 spec/td/helpers_spec.rb
td-0.13.1 spec/td/helpers_spec.rb
td-0.13.0 spec/td/helpers_spec.rb
td-0.12.0 spec/td/helpers_spec.rb
td-0.11.14 spec/td/helpers_spec.rb
td-0.11.13 spec/td/helpers_spec.rb
td-0.11.12 spec/td/helpers_spec.rb
td-0.11.11.2 spec/td/helpers_spec.rb
td-0.11.11.1 spec/td/helpers_spec.rb
td-0.11.11 spec/td/helpers_spec.rb
td-0.11.10 spec/td/helpers_spec.rb
td-0.11.9 spec/td/helpers_spec.rb
td-0.11.8.2 spec/td/helpers_spec.rb
td-0.11.8.1 spec/td/helpers_spec.rb
td-0.11.8 spec/td/helpers_spec.rb
td-0.11.7 spec/td/helpers_spec.rb
td-0.11.6 spec/td/helpers_spec.rb
td-0.11.5 spec/td/helpers_spec.rb