Sha256: 305b5a699a22b58ddf1c13f1648a93caa34bdf0cf14fdaf61fef5449cc2438e7
Contents?: true
Size: 844 Bytes
Versions: 2
Compression:
Stored size: 844 Bytes
Contents
# -*- encoding: utf-8 -*- # require 'spec_helper' RSpec.describe Bbrcobranca::FormatacaoString do context 'no arguments' do it { expect { ''.format_size }.to raise_error(ArgumentError) } end context 'blank' do it { expect(' '.format_size(10)).to eq(' ') } it { expect(''.format_size(10)).to eq(' ') } end context 'above size' do it { expect("SOÇIEDADE, BRASI@?!+-_LEIR'\"A DE ZÔÔLOGIA LTDA.".format_size(30)).to eql('SOCIEDADE BRASILEIRA DE ZOOLOG') } it { expect('pablo diego JOSÉ FRANCISCO DE PAULA JUAN'.format_size(30)).to eql('pablo diego JOSE FRANCISCO DE ') } end context 'bellow size' do it { expect('SOCIEDADE'.format_size(30)).to eql('SOCIEDADE ') } it { expect('caçaróla'.format_size(30)).to eql('cacarola ') } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bbrcobranca-0.0.2 | spec/brcobranca/formatacao_string_spec.rb |
bbrcobranca-0.0.1 | spec/brcobranca/formatacao_string_spec.rb |