Sha256: b54b2c788b8d19f45870dffb9f8ffd9d6bec1f02884c474c1053189d021c919b

Contents?: true

Size: 1.01 KB

Versions: 2

Compression:

Stored size: 1.01 KB

Contents

# -*- encoding: utf-8 -*-
require 'spec_helper'

RSpec.describe 'RGhost' do
  before do
    @valid_attributes = {
      especie_documento: 'DM',
      moeda: '9',
      data_documento: Date.today,
      dias_vencimento: 1,
      aceite: 'S',
      quantidade: 1,
      valor: 0.0,
      local_pagamento: 'QUALQUER BANCO ATÉ O VENCIMENTO',
      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 'Testar se RGhost e GhostScript estão instalados' do
    # RGhost::Config.config_platform
    expect(File.exist?(RGhost::Config::GS[:path])).to be_truthy
    expect(File.executable?(RGhost::Config::GS[:path])).to be_truthy
    s = `#{RGhost::Config::GS[:path]} -v`
    expect(s).to match(/^GPL Ghostscript/)
    s = `#{RGhost::Config::GS[:path]} --version`
    expect(s).to match(/[8-9]\.[0-9]/)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
brcobranca-5.0.2 spec/brcobranca/rghost_spec.rb
brcobranca-5.0.1 spec/brcobranca/rghost_spec.rb