Sha256: 1b6dd97376c29ec9405bee0147f67cdef700b2617325687481f4c175859f75fc
Contents?: true
Size: 346 Bytes
Versions: 3
Compression:
Stored size: 346 Bytes
Contents
require "spec_helper" describe CPF::Formatter do it "formats strings without separators" do number = "12345678909" expect(CPF::Formatter.format(number)).to eql("123.456.789-09") end it "removes any non-numeric characters" do number = "\n12.-34567$8909" expect(CPF::Formatter.strip(number)).to eql("12345678909") end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cpf_cnpj-0.2.1 | spec/cpf/formatter_spec.rb |
cpf_cnpj-0.2.0 | spec/cpf/formatter_spec.rb |
cpf_cnpj-0.1.0 | spec/cpf/formatter_spec.rb |