Sha256: 8d37c14112e654d5123bc769215652f9051c81790cc175dc0f678d2bc2c1db96
Contents?: true
Size: 363 Bytes
Versions: 3
Compression:
Stored size: 363 Bytes
Contents
require "spec_helper" describe CNPJ::Formatter do it "formats strings without separators" do number = "12345678901234" expect(CNPJ::Formatter.format(number)).to eql("12.345.678/9012-34") end it "removes any non-numeric characters" do number = "\n12$345[678/9012-34" expect(CNPJ::Formatter.strip(number)).to eql("12345678901234") end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cpf_cnpj-0.2.1 | spec/cnpj/formatter_spec.rb |
cpf_cnpj-0.2.0 | spec/cnpj/formatter_spec.rb |
cpf_cnpj-0.1.0 | spec/cnpj/formatter_spec.rb |