Sha256: 5a6b7187520a3f87dfe7614b5a7d434cba32823ed8ea09bc723b95d45044ef18

Contents?: true

Size: 538 Bytes

Versions: 1

Compression:

Stored size: 538 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

class Sicredi < BoletoBancario::Sicredi
  def self.valor_documento_tamanho_maximo
    250 # Default 99999999.99
  end

  def self.carteiras_suportadas
    %w[102] # Default %w[11 31]
  end
end

describe Sicredi do
  describe "on validations" do
    it { should have_valid(:valor_documento).when(99, 249, 250) }
    it { should_not have_valid(:valor_documento).when(250.01, 260) }

    it { should have_valid(:carteira).when(102) }
    it { should_not have_valid(:carteira).when(1, 31) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
boleto_bancario-0.0.2 spec/inheritance/sicredi_spec.rb