Sha256: 99bb7260c6c0044de3d25cfbd6742070f29e58e857057a9f205acc15c861411c
Contents?: true
Size: 811 Bytes
Versions: 6
Compression:
Stored size: 811 Bytes
Contents
require 'rails_helper' RSpec.describe BoaVistaStubs::Document::Cnpj do subject(:instance) { described_class.new(document_number) } let(:document_number) { '43075232000115' } describe '#initialize' do it { expect(instance).to be_a_instance_of(described_class) } end describe '#valid?' do it 'returns true when the document number is included in configuration' do document = described_class.new(document_number) expect(document).to be_valid end it 'returns false when the document number is not included in configuration' do document_number = '12345678910' document = described_class.new(document_number) expect(document).to_not be_valid end end describe '#document_type' do it { expect(instance.document_type).to eq(:CNPJ) } end end
Version data entries
6 entries across 6 versions & 1 rubygems