Sha256: e55214097c721c5235b15db4c8b190727f1c0a095e02fe46a076d893d7fd1905
Contents?: true
Size: 828 Bytes
Versions: 25
Compression:
Stored size: 828 Bytes
Contents
# -*- encoding: utf-8 -*- require 'spec_helper' RSpec.describe Brcobranca::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('SOCIEDADE BRASILEIRA DE ZOOLOGIA 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
25 entries across 25 versions & 1 rubygems