Sha256: 16389bfb2a9d066d3c5d71a40a620b703c0e6c4c107fa245198711a43227dc8e
Contents?: true
Size: 1.17 KB
Versions: 27
Compression:
Stored size: 1.17 KB
Contents
# -*- encoding: utf-8 -*- require 'spec_helper' RSpec.describe 'MuĂșltiplos boletos' do #:nodoc:[all] before do @valid_attributes = { valor: 0.0, cedente: 'Kivanio Barbosa', documento_cedente: '12345678912', sacado: 'Claudio Pozzebom', sacado_documento: '12345678900', agencia: '4042', conta_corrente: '61900', convenio: 12_387_989, numero_documento: '777700168' } end it 'imprimir mĂșltiplos boleto em lote' do boleto_1 = Brcobranca::Boleto::BancoBrasil.new(@valid_attributes) boleto_2 = Brcobranca::Boleto::Bradesco.new(@valid_attributes) boleto_3 = Brcobranca::Boleto::BancoBrasil.new(@valid_attributes) boletos = [boleto_1, boleto_2, boleto_3] %w(pdf jpg tif png).each do |format| file_body = Brcobranca::Boleto::Base.lote(boletos, formato: "#{format}".to_sym) tmp_file = Tempfile.new('foobar.' << format) tmp_file.puts file_body tmp_file.close expect(File.exist?(tmp_file.path)).to be_truthy expect(File.stat(tmp_file.path).zero?).to be_falsey expect(File.delete(tmp_file.path)).to eql(1) expect(File.exist?(tmp_file.path)).to be_falsey end end end
Version data entries
27 entries across 27 versions & 1 rubygems