Sha256: 5934323890c208b00adac8bd9e1089c37de3b66513d24f99168e7e22b6601f3f
Contents?: true
Size: 511 Bytes
Versions: 27
Compression:
Stored size: 511 Bytes
Contents
require "spec_helper" describe BrDanfe::DanfeLib::Phone do describe ".format" do context "when phone have 10 digits" do it "returns a formated phone" do phone = "1234567890" expect(BrDanfe::DanfeLib::Phone.format(phone)).to eq "(12) 3456-7890" end end context "when phone have 11 digits" do it "returns a formated phone" do phone = "12345678901" expect(BrDanfe::DanfeLib::Phone.format(phone)).to eq "(12) 34567-8901" end end end end
Version data entries
27 entries across 27 versions & 1 rubygems