br_nfe 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +0 -1
- data/Gemfile.lock +1 -1
- data/README.markdown +264 -106
- data/lib/br_nfe/{helper → association}/have_address.rb +1 -1
- data/lib/br_nfe/{helper → association}/have_condicao_pagamento.rb +1 -1
- data/lib/br_nfe/association/have_destinatario.rb +22 -0
- data/lib/br_nfe/association/have_emitente.rb +24 -0
- data/lib/br_nfe/base.rb +37 -27
- data/lib/br_nfe/condicao_pagamento.rb +2 -0
- data/lib/br_nfe/constants.rb +33 -0
- data/lib/br_nfe/endereco.rb +10 -0
- data/lib/br_nfe/helper/string_methods.rb +4 -0
- data/lib/br_nfe/{emitente.rb → person.rb} +11 -7
- data/lib/br_nfe/product/base.rb +82 -0
- data/lib/br_nfe/product/consulta_status_servico.rb +35 -0
- data/lib/br_nfe/product/emitente.rb +8 -0
- data/lib/br_nfe/product/gateway/base.rb +62 -0
- data/lib/br_nfe/product/gateway/web_service_svrs.rb +39 -0
- data/lib/br_nfe/product/value_nf.rb +9 -0
- data/lib/br_nfe/product/xml/soap_env.xml.slim +8 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/consReciNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/consSitNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/consStatServ_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/enviNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/inutNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/leiauteConsSitNFe_v3.10.xsd +502 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/leiauteConsStatServ_v3.10.xsd +98 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/leiauteInutNFe_v3.10.xsd +193 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/leiauteNFe_v3.10.xsd +6060 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/nfe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/procInutNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/procNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/retConsReciNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/retConsSitNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/retConsStatServ_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/retEnviNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/retInutNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/tiposBasico_v3.10.xsd +571 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/xmldsig-core-schema_v1.01.xsd +98 -0
- data/lib/br_nfe/product/xml/v3_10/consulta_status_servico.xml.slim +4 -0
- data/lib/br_nfe/service/association/have_intermediario.rb +26 -0
- data/lib/br_nfe/service/association/have_rps.rb +36 -0
- data/lib/br_nfe/service/base.rb +24 -20
- data/lib/br_nfe/service/betha/v1/cancela_nfse.rb +43 -0
- data/lib/br_nfe/service/betha/v1/consulta_lote_rps.rb +20 -6
- data/lib/br_nfe/service/betha/v1/consulta_nfs_por_rps.rb +17 -6
- data/lib/br_nfe/service/betha/v1/consulta_nfse.rb +16 -5
- data/lib/br_nfe/service/betha/v1/consulta_situacao_lote_rps.rb +15 -6
- data/lib/br_nfe/service/betha/v1/gateway.rb +4 -0
- data/lib/br_nfe/service/betha/v1/recepcao_lote_rps.rb +13 -5
- data/lib/br_nfe/service/betha/v1/xml/_tc_identificacao_prestador.xml.slim +3 -0
- data/lib/br_nfe/service/betha/v1/xml/_tc_pedido_cancelamento.xml.slim +4 -0
- data/lib/br_nfe/service/concerns/rules/cancelamento_nfs.rb +8 -0
- data/lib/br_nfe/service/concerns/rules/consulta_nfs_por_rps.rb +1 -1
- data/lib/br_nfe/service/concerns/rules/consulta_nfse.rb +5 -2
- data/lib/br_nfe/service/concerns/values_ts/service_v1.rb +319 -0
- data/lib/br_nfe/service/destinatario.rb +7 -0
- data/lib/br_nfe/service/emitente.rb +8 -0
- data/lib/br_nfe/service/intermediario.rb +1 -12
- data/lib/br_nfe/service/item.rb +7 -7
- data/lib/br_nfe/service/response/build/base.rb +166 -0
- data/lib/br_nfe/service/response/build/cancelamento.rb +62 -0
- data/lib/br_nfe/service/response/build/consulta_lote_rps.rb +25 -0
- data/lib/br_nfe/service/response/build/consulta_nfs_por_rps.rb +25 -0
- data/lib/br_nfe/service/response/build/consulta_nfse.rb +24 -0
- data/lib/br_nfe/service/response/build/consulta_situacao_lote_rps.rb +56 -0
- data/lib/br_nfe/service/response/build/invoice_build.rb +359 -0
- data/lib/br_nfe/service/response/build/recepcao_lote_rps.rb +69 -0
- data/lib/br_nfe/service/response/cancelamento.rb +22 -0
- data/lib/br_nfe/service/response/consulta_lote_rps.rb +18 -0
- data/lib/br_nfe/service/response/consulta_nfs_por_rps.rb +10 -0
- data/lib/br_nfe/service/response/consulta_nfse.rb +10 -0
- data/lib/br_nfe/service/response/consulta_situacao_lote_rps.rb +74 -0
- data/lib/br_nfe/service/response/default.rb +93 -0
- data/lib/br_nfe/{response/service → service/response}/nota_fiscal.rb +19 -12
- data/lib/br_nfe/service/response/paths/v1/tc_nfse.rb +275 -0
- data/lib/br_nfe/service/response/recepcao_lote_rps.rb +35 -0
- data/lib/br_nfe/service/rps.rb +30 -27
- data/lib/br_nfe/service/sc/florianopolis/xml/_service_item.xml.slim +4 -4
- data/lib/br_nfe/service/sc/florianopolis/xml/inf_requisicao.xml.slim +4 -4
- data/lib/br_nfe/service/simpliss/v1/cancela_nfse.rb +16 -6
- data/lib/br_nfe/service/simpliss/v1/consulta_lote_rps.rb +20 -12
- data/lib/br_nfe/service/simpliss/v1/consulta_nfs_por_rps.rb +21 -6
- data/lib/br_nfe/service/simpliss/v1/consulta_nfse.rb +20 -6
- data/lib/br_nfe/service/simpliss/v1/consulta_situacao_lote_rps.rb +17 -6
- data/lib/br_nfe/service/simpliss/v1/recepcao_lote_rps.rb +16 -4
- data/lib/br_nfe/service/simpliss/v1/xml/_tc_item_servico.xml.slim +2 -2
- data/lib/br_nfe/service/thema/v1/cancela_nfse.rb +21 -19
- data/lib/br_nfe/service/thema/v1/consulta_lote_rps.rb +21 -19
- data/lib/br_nfe/service/thema/v1/consulta_nfs_por_rps.rb +25 -18
- data/lib/br_nfe/service/thema/v1/consulta_nfse.rb +20 -20
- data/lib/br_nfe/service/thema/v1/consulta_situacao_lote_rps.rb +14 -20
- data/lib/br_nfe/service/thema/v1/recepcao_lote_rps.rb +11 -16
- data/lib/br_nfe/service/thema/v1/recepcao_lote_rps_limitado.rb +8 -6
- data/lib/br_nfe/service/xml/v1/_tc_identificacao_nfse.xml.slim +1 -1
- data/lib/br_nfe/service/xml/v1/_tc_pedido_cancelamento.xml.slim +1 -1
- data/lib/br_nfe/service/xml/v1/_tc_valores.xml.slim +11 -11
- data/lib/br_nfe/version.rb +1 -1
- data/lib/br_nfe.rb +62 -62
- data/test/br_nfe/association/have_address_test.rb +64 -0
- data/test/br_nfe/association/have_condicao_pagamento_test.rb +75 -0
- data/test/br_nfe/association/have_destinatario_test.rb +76 -0
- data/test/br_nfe/association/have_emitente_test.rb +80 -0
- data/test/br_nfe/base_test.rb +96 -61
- data/test/br_nfe/endereco_test.rb +21 -0
- data/test/br_nfe/person_test.rb +55 -0
- data/test/br_nfe/product/base_test.rb +150 -0
- data/test/br_nfe/product/consulta_status_servico_test.rb +59 -0
- data/test/br_nfe/product/emitente_test.rb +29 -0
- data/test/br_nfe/product/gateway/base_test.rb +16 -0
- data/test/br_nfe/product/gateway/web_service_svrs_test.rb +36 -0
- data/test/br_nfe/service/association/have_intermediario_test.rb +80 -0
- data/test/br_nfe/service/association/have_rps_test.rb +62 -0
- data/test/br_nfe/service/base_test.rb +42 -42
- data/test/br_nfe/service/betha/v1/cancela_nfse_test.rb +90 -0
- data/test/br_nfe/service/betha/v1/consulta_lote_rps_test.rb +105 -5
- data/test/br_nfe/service/betha/v1/consulta_nfs_por_rps_test.rb +103 -5
- data/test/br_nfe/service/betha/v1/consulta_nfse_test.rb +114 -5
- data/test/br_nfe/service/betha/v1/consulta_situacao_lote_rps_test.rb +118 -5
- data/test/br_nfe/service/betha/v1/gateway_test.rb +1 -1
- data/test/br_nfe/service/betha/v1/recepcao_lote_rps_test.rb +51 -5
- data/test/br_nfe/service/concerns/rules/cancelamento_nfs_test.rb +2 -2
- data/test/br_nfe/service/concerns/rules/consulta_nfs_por_rps_test.rb +2 -7
- data/test/br_nfe/service/concerns/rules/consulta_nfse_test.rb +24 -3
- data/test/br_nfe/service/concerns/rules/recepcao_lote_rps_test.rb +1 -1
- data/test/br_nfe/{helper → service/concerns}/values_ts/service_v1_test.rb +2 -2
- data/test/br_nfe/{destinatario_test.rb → service/destinatario_test.rb} +3 -4
- data/test/br_nfe/service/emitente_test.rb +29 -0
- data/test/br_nfe/service/item_test.rb +14 -14
- data/test/br_nfe/service/response/build/base_test.rb +80 -0
- data/test/br_nfe/{response/service → service/response}/default_test.rb +1 -82
- data/test/br_nfe/service/response/nota_fiscal_test.rb +59 -0
- data/test/br_nfe/{response/service → service/response}/paths/v1/tc_nfse_test.rb +10 -10
- data/test/br_nfe/service/rps_test.rb +107 -138
- data/test/br_nfe/service/sc/florianopolis/emission_rps_test.rb +9 -9
- data/test/br_nfe/service/simpliss/v1/base_test.rb +1 -1
- data/test/br_nfe/service/simpliss/v1/cancela_nfse_test.rb +7 -10
- data/test/br_nfe/service/simpliss/v1/consulta_lote_rps_test.rb +11 -18
- data/test/br_nfe/service/simpliss/v1/consulta_nfs_por_rps_test.rb +11 -18
- data/test/br_nfe/service/simpliss/v1/consulta_nfse_test.rb +11 -18
- data/test/br_nfe/service/simpliss/v1/consulta_situacao_lote_rps_test.rb +7 -11
- data/test/br_nfe/service/simpliss/v1/recepcao_lote_rps_test.rb +3 -9
- data/test/br_nfe/service/thema/v1/base_test.rb +1 -1
- data/test/br_nfe/service/thema/v1/cancela_nfse_test.rb +7 -14
- data/test/br_nfe/service/thema/v1/consulta_lote_rps_test.rb +6 -17
- data/test/br_nfe/service/thema/v1/consulta_nfs_por_rps_test.rb +6 -13
- data/test/br_nfe/service/thema/v1/consulta_nfse_test.rb +11 -18
- data/test/br_nfe/service/thema/v1/consulta_situacao_lote_rps_test.rb +7 -11
- data/test/br_nfe/service/thema/v1/recepcao_lote_rps_limitado_test.rb +1 -5
- data/test/br_nfe/service/thema/v1/recepcao_lote_rps_test.rb +3 -9
- data/test/factories/base.rb +0 -1
- data/test/factories/{emitente.rb → person.rb} +1 -1
- data/test/factories/product/base.rb +12 -0
- data/test/factories/product/consulta_status_servico.rb +12 -0
- data/test/factories/product/emitente.rb +15 -0
- data/test/factories/product/gateway/base.rb +5 -0
- data/test/factories/product/gateway/web_service_svrs.rb +5 -0
- data/test/factories/service/betha/v1/{cancelamento_nfs.rb → cancela_nfse.rb} +2 -1
- data/test/factories/service/betha/v1/consulta_lote_rps.rb +1 -1
- data/test/factories/service/betha/v1/consulta_nfs_por_rps.rb +1 -1
- data/test/factories/service/betha/v1/consulta_nfse.rb +1 -1
- data/test/factories/service/betha/v1/consulta_situacao_lote_rps.rb +1 -1
- data/test/factories/{destinatario.rb → service/destinatario.rb} +1 -1
- data/test/factories/service/emitente.rb +15 -0
- data/test/factories/service/item.rb +4 -4
- data/test/factories/service/response/build_response.rb +5 -0
- data/test/factories/service/response/default.rb +6 -0
- data/test/factories/{response/service → service/response}/nota_fiscal.rb +8 -8
- data/test/factories/service/rps.rb +11 -11
- data/test/factories/service/sc/florianopolis/base.rb +1 -1
- data/test/factories/service/sc/florianopolis/cancellation.rb +1 -1
- data/test/factories/service/sc/florianopolis/emission_rps.rb +1 -1
- data/test/factories/service/simpliss/v1/base.rb +1 -1
- data/test/factories/service/simpliss/v1/cancela_nfse.rb +1 -1
- data/test/factories/service/simpliss/v1/consulta_lote_rps.rb +1 -1
- data/test/factories/service/simpliss/v1/consulta_nfs_por_rps.rb +1 -1
- data/test/factories/service/simpliss/v1/consulta_nfse.rb +1 -1
- data/test/factories/service/simpliss/v1/consulta_situacao_lote_rps.rb +1 -1
- data/test/factories/service/simpliss/v1/recepcao_lote_rps.rb +1 -1
- data/test/factories/service/thema/v1/base.rb +1 -1
- data/test/factories/service/thema/v1/cancela_nfse.rb +1 -1
- data/test/factories/service/thema/v1/consulta_lote_rps.rb +1 -1
- data/test/factories/service/thema/v1/consulta_nfs_por_rps.rb +1 -1
- data/test/factories/service/thema/v1/consulta_nfse.rb +1 -1
- data/test/factories/service/thema/v1/consulta_situacao_lote_rps.rb +1 -1
- data/test/factories/service/thema/v1/recepcao_lote_rps.rb +1 -1
- data/test/fixtures/service/response/betha/v1/cancela_nfse/fault.xml +17 -0
- data/test/fixtures/service/response/betha/v1/cancela_nfse/success.xml +48 -0
- data/test/fixtures/service/response/betha/v1/consulta_lote_rps/fault.xml +18 -0
- data/test/fixtures/service/response/betha/v1/consulta_lote_rps/success.xml +108 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse/fault.xml +18 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse/nfs_empty.xml +12 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse/success.xml +115 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse_por_rps/fault.xml +18 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse_por_rps/success.xml +103 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/error.xml +13 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/fault.xml +17 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/success.xml +13 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/unprocessed.xml +13 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/unprocessed_by_code_error.xml +17 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/unreceived.xml +13 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/unreceived_by_code_error.xml +17 -0
- data/test/fixtures/service/response/betha/v1/recepcao_lote_rps/error.xml +17 -0
- data/test/fixtures/service/response/betha/v1/recepcao_lote_rps/success.xml +14 -0
- metadata +160 -94
- data/lib/br_nfe/destinatario.rb +0 -26
- data/lib/br_nfe/helper/have_destinatario.rb +0 -18
- data/lib/br_nfe/helper/have_emitente.rb +0 -20
- data/lib/br_nfe/helper/have_intermediario.rb +0 -24
- data/lib/br_nfe/helper/have_rps.rb +0 -34
- data/lib/br_nfe/helper/values_ts/service_v1.rb +0 -317
- data/lib/br_nfe/response/service/build_response.rb +0 -463
- data/lib/br_nfe/response/service/default.rb +0 -185
- data/lib/br_nfe/response/service/paths/base.rb +0 -127
- data/lib/br_nfe/response/service/paths/v1/servico_cancelar_nfse_resposta.rb +0 -22
- data/lib/br_nfe/response/service/paths/v1/servico_consultar_lote_rps_resposta.rb +0 -25
- data/lib/br_nfe/response/service/paths/v1/servico_consultar_nfse_resposta.rb +0 -25
- data/lib/br_nfe/response/service/paths/v1/servico_consultar_nfse_rps_resposta.rb +0 -25
- data/lib/br_nfe/response/service/paths/v1/servico_consultar_situacao_lote_rps_resposta.rb +0 -31
- data/lib/br_nfe/response/service/paths/v1/servico_enviar_lote_rps_resposta.rb +0 -36
- data/lib/br_nfe/response/service/paths/v1/tc_nfse.rb +0 -271
- data/lib/br_nfe/service/betha/v1/cancelamento_nfs.rb +0 -36
- data/lib/br_nfe/service/betha/v1/response_paths/servico_consultar_lote_rps_resposta.rb +0 -23
- data/lib/br_nfe/service/betha/v1/response_paths/servico_consultar_nfse_resposta.rb +0 -21
- data/lib/br_nfe/service/betha/v1/response_paths/servico_consultar_nfse_rps_resposta.rb +0 -21
- data/lib/br_nfe/service/simpliss/v1/response_paths/servico_cancelar_nfse_resposta.rb +0 -22
- data/lib/br_nfe/service/simpliss/v1/response_paths/servico_consultar_lote_rps_resposta.rb +0 -25
- data/lib/br_nfe/service/simpliss/v1/response_paths/servico_consultar_nfse_resposta.rb +0 -25
- data/lib/br_nfe/service/simpliss/v1/response_paths/servico_consultar_nfse_rps_resposta.rb +0 -25
- data/lib/br_nfe/service/simpliss/v1/response_paths/servico_consultar_situacao_lote_rps_resposta.rb +0 -31
- data/lib/br_nfe/service/simpliss/v1/response_paths/servico_enviar_lote_rps_resposta.rb +0 -36
- data/lib/br_nfe/service/thema/v1/response_paths/servico_cancelar_nfse_resposta.rb +0 -17
- data/lib/br_nfe/service/thema/v1/response_paths/servico_consultar_nfse_rps_resposta.rb +0 -19
- data/test/br_nfe/emitente_test.rb +0 -46
- data/test/br_nfe/helper/have_address_test.rb +0 -62
- data/test/br_nfe/helper/have_condicao_pagamento_test.rb +0 -71
- data/test/br_nfe/helper/have_destinatario_test.rb +0 -64
- data/test/br_nfe/helper/have_emitente_test.rb +0 -63
- data/test/br_nfe/helper/have_intermediario_test.rb +0 -77
- data/test/br_nfe/helper/have_rps_test.rb +0 -59
- data/test/br_nfe/response/service/build_response_test.rb +0 -205
- data/test/br_nfe/response/service/nota_fiscal_test.rb +0 -41
- data/test/br_nfe/response/service/paths/base_test.rb +0 -196
- data/test/br_nfe/response/service/paths/v1/servico_cancelar_nfse_resposta_test.rb +0 -25
- data/test/br_nfe/response/service/paths/v1/servico_consultar_lote_rps_resposta_test.rb +0 -30
- data/test/br_nfe/response/service/paths/v1/servico_consultar_nfse_resposta_test.rb +0 -30
- data/test/br_nfe/response/service/paths/v1/servico_consultar_nfse_rps_resposta_test.rb +0 -30
- data/test/br_nfe/response/service/paths/v1/servico_consultar_situacao_lote_rps_resposta_test.rb +0 -30
- data/test/br_nfe/response/service/paths/v1/servico_enviar_lote_rps_resposta_test.rb +0 -34
- data/test/br_nfe/service/betha/v1/cancelamento_nfs_test.rb +0 -54
- data/test/br_nfe/service/betha/v1/response_paths/servico_consultar_lote_rps_resposta_test.rb +0 -16
- data/test/br_nfe/service/betha/v1/response_paths/servico_consultar_nfse_resposta_test.rb +0 -16
- data/test/br_nfe/service/betha/v1/response_paths/servico_consultar_nfse_rps_resposta_test.rb +0 -16
- data/test/factories/response/service/build_response.rb +0 -5
- data/test/factories/response/service/default.rb +0 -10
data/lib/br_nfe.rb
CHANGED
@@ -12,13 +12,16 @@ require "signer"
|
|
12
12
|
require "savon"
|
13
13
|
require "slim"
|
14
14
|
|
15
|
-
require "br_nfe/
|
16
|
-
require "br_nfe/
|
17
|
-
require "br_nfe/
|
18
|
-
require "br_nfe/
|
19
|
-
|
20
|
-
require "br_nfe/
|
21
|
-
require "br_nfe/
|
15
|
+
require "br_nfe/association/have_address"
|
16
|
+
require "br_nfe/association/have_condicao_pagamento"
|
17
|
+
require "br_nfe/association/have_emitente"
|
18
|
+
require "br_nfe/association/have_destinatario"
|
19
|
+
|
20
|
+
require "br_nfe/service/association/have_intermediario"
|
21
|
+
require "br_nfe/service/association/have_rps"
|
22
|
+
|
23
|
+
# Formatação de valores para XML
|
24
|
+
require "br_nfe/service/concerns/values_ts/service_v1"
|
22
25
|
|
23
26
|
# Regras e atributos para as classes
|
24
27
|
require "br_nfe/service/concerns/rules/recepcao_lote_rps"
|
@@ -26,16 +29,8 @@ require "br_nfe/service/concerns/rules/consulta_nfse"
|
|
26
29
|
require "br_nfe/service/concerns/rules/consulta_nfs_por_rps"
|
27
30
|
require "br_nfe/service/concerns/rules/cancelamento_nfs"
|
28
31
|
|
29
|
-
# Carrega os modules que contém os paths para buildar a
|
30
|
-
require 'br_nfe/response/
|
31
|
-
require 'br_nfe/response/service/paths/v1/tc_nfse.rb'
|
32
|
-
|
33
|
-
require 'br_nfe/response/service/paths/v1/servico_cancelar_nfse_resposta.rb'
|
34
|
-
require 'br_nfe/response/service/paths/v1/servico_consultar_lote_rps_resposta.rb'
|
35
|
-
require 'br_nfe/response/service/paths/v1/servico_consultar_nfse_resposta.rb'
|
36
|
-
require 'br_nfe/response/service/paths/v1/servico_consultar_nfse_rps_resposta.rb'
|
37
|
-
require 'br_nfe/response/service/paths/v1/servico_consultar_situacao_lote_rps_resposta.rb'
|
38
|
-
require 'br_nfe/response/service/paths/v1/servico_enviar_lote_rps_resposta.rb'
|
32
|
+
# Carrega os modules que contém os paths para buildar a nfs
|
33
|
+
require 'br_nfe/service/response/paths/v1/tc_nfse.rb'
|
39
34
|
|
40
35
|
# Copyright (C) 2015 Bruno M. Mergen
|
41
36
|
#
|
@@ -56,24 +51,42 @@ module BrNfe
|
|
56
51
|
end
|
57
52
|
|
58
53
|
extend ActiveSupport::Autoload
|
54
|
+
autoload :Constants
|
59
55
|
autoload :ActiveModelBase
|
60
56
|
autoload :Endereco
|
61
|
-
autoload :
|
62
|
-
autoload :Destinatario
|
57
|
+
autoload :Person
|
63
58
|
autoload :Base
|
64
59
|
autoload :CondicaoPagamento
|
65
60
|
|
66
|
-
|
67
|
-
|
61
|
+
|
62
|
+
module Service
|
63
|
+
extend ActiveSupport::Autoload
|
64
|
+
module Response
|
68
65
|
extend ActiveSupport::Autoload
|
69
66
|
autoload :Default
|
70
67
|
autoload :NotaFiscal
|
71
|
-
autoload :
|
68
|
+
autoload :Cancelamento
|
69
|
+
autoload :ConsultaLoteRps
|
70
|
+
autoload :ConsultaNfsPorRps
|
71
|
+
autoload :ConsultaNfse
|
72
|
+
autoload :ConsultaSituacaoLoteRps
|
73
|
+
autoload :RecepcaoLoteRps
|
74
|
+
|
75
|
+
module Build
|
76
|
+
extend ActiveSupport::Autoload
|
77
|
+
autoload :Base
|
78
|
+
autoload :InvoiceBuild
|
79
|
+
autoload :Cancelamento
|
80
|
+
autoload :ConsultaLoteRps
|
81
|
+
autoload :ConsultaNfsPorRps
|
82
|
+
autoload :ConsultaNfse
|
83
|
+
autoload :ConsultaSituacaoLoteRps
|
84
|
+
autoload :RecepcaoLoteRps
|
85
|
+
end
|
72
86
|
end
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
extend ActiveSupport::Autoload
|
87
|
+
|
88
|
+
autoload :Emitente
|
89
|
+
autoload :Destinatario
|
77
90
|
autoload :Intermediario
|
78
91
|
autoload :Item
|
79
92
|
autoload :Rps
|
@@ -83,29 +96,18 @@ module BrNfe
|
|
83
96
|
extend ActiveSupport::Autoload
|
84
97
|
autoload :Base
|
85
98
|
module V1
|
86
|
-
module ResponsePaths
|
87
|
-
extend ActiveSupport::Autoload
|
88
|
-
autoload :ServicoConsultarLoteRpsResposta
|
89
|
-
autoload :ServicoConsultarNfseResposta
|
90
|
-
autoload :ServicoConsultarNfseRpsResposta
|
91
|
-
end
|
92
99
|
extend ActiveSupport::Autoload
|
93
100
|
autoload :Gateway
|
94
101
|
autoload :ConsultaLoteRps
|
95
102
|
autoload :ConsultaNfse
|
96
103
|
autoload :ConsultaNfsPorRps
|
97
|
-
autoload :
|
104
|
+
autoload :CancelaNfse
|
98
105
|
autoload :ConsultaSituacaoLoteRps
|
99
106
|
autoload :RecepcaoLoteRps
|
100
107
|
end
|
101
108
|
end
|
102
109
|
module Thema
|
103
110
|
module V1
|
104
|
-
module ResponsePaths
|
105
|
-
extend ActiveSupport::Autoload
|
106
|
-
autoload :ServicoCancelarNfseResposta
|
107
|
-
autoload :ServicoConsultarNfseRpsResposta
|
108
|
-
end
|
109
111
|
extend ActiveSupport::Autoload
|
110
112
|
autoload :Base
|
111
113
|
autoload :CancelaNfse
|
@@ -119,15 +121,6 @@ module BrNfe
|
|
119
121
|
end
|
120
122
|
module Simpliss
|
121
123
|
module V1
|
122
|
-
module ResponsePaths
|
123
|
-
extend ActiveSupport::Autoload
|
124
|
-
autoload :ServicoCancelarNfseResposta
|
125
|
-
autoload :ServicoConsultarLoteRpsResposta
|
126
|
-
autoload :ServicoConsultarNfseRpsResposta
|
127
|
-
autoload :ServicoConsultarNfseResposta
|
128
|
-
autoload :ServicoConsultarSituacaoLoteRpsResposta
|
129
|
-
autoload :ServicoEnviarLoteRpsResposta
|
130
|
-
end
|
131
124
|
extend ActiveSupport::Autoload
|
132
125
|
autoload :Base
|
133
126
|
autoload :CancelaNfse
|
@@ -156,8 +149,19 @@ module BrNfe
|
|
156
149
|
def self.only_number(value)
|
157
150
|
"#{value}".gsub(/[^0-9]/,'')
|
158
151
|
end
|
152
|
+
end
|
159
153
|
|
160
|
-
|
154
|
+
module Product
|
155
|
+
extend ActiveSupport::Autoload
|
156
|
+
module Gateway
|
157
|
+
extend ActiveSupport::Autoload
|
158
|
+
autoload :Base
|
159
|
+
autoload :WebServiceSVRS
|
160
|
+
end
|
161
|
+
autoload :Emitente
|
162
|
+
autoload :ValueNf
|
163
|
+
autoload :Base
|
164
|
+
autoload :ConsultaStatusServico
|
161
165
|
end
|
162
166
|
|
163
167
|
|
@@ -171,14 +175,18 @@ module BrNfe
|
|
171
175
|
mattr_accessor :endereco_class
|
172
176
|
@@endereco_class = BrNfe::Endereco
|
173
177
|
|
174
|
-
|
175
|
-
|
178
|
+
# Define as classes que serão usadas para instanciar o objeto
|
179
|
+
# Emitente para as notas de Serviço e Produto
|
180
|
+
mattr_accessor :emitente_service_class
|
181
|
+
mattr_accessor :emitente_product_class
|
182
|
+
@@emitente_service_class = BrNfe::Service::Emitente
|
183
|
+
@@emitente_product_class = BrNfe::Product::Emitente
|
176
184
|
|
177
|
-
mattr_accessor :
|
178
|
-
@@
|
185
|
+
mattr_accessor :destinatario_service_class
|
186
|
+
@@destinatario_service_class = BrNfe::Service::Destinatario
|
179
187
|
|
180
|
-
mattr_accessor :
|
181
|
-
@@
|
188
|
+
mattr_accessor :intermediario_service_class
|
189
|
+
@@intermediario_service_class = BrNfe::Service::Intermediario
|
182
190
|
|
183
191
|
mattr_accessor :condicao_pagamento_class
|
184
192
|
@@condicao_pagamento_class = BrNfe::CondicaoPagamento
|
@@ -189,14 +197,6 @@ module BrNfe
|
|
189
197
|
mattr_accessor :service_item_class
|
190
198
|
@@service_item_class = BrNfe::Service::Item
|
191
199
|
|
192
|
-
# Configurações do Cliente WSDL
|
193
|
-
mattr_accessor :client_wsdl_ssl_verify_mode
|
194
|
-
@@client_wsdl_ssl_verify_mode = :none
|
195
|
-
|
196
|
-
mattr_accessor :client_wsdl_ssl_cert_file
|
197
|
-
mattr_accessor :client_wsdl_ssl_cert_key_file
|
198
|
-
mattr_accessor :client_wsdl_ssl_cert_key_password
|
199
|
-
|
200
200
|
mattr_accessor :client_wsdl_log
|
201
201
|
@@client_wsdl_log = false
|
202
202
|
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class HaveAddressTest < BrNfe::ActiveModelBase
|
4
|
+
include BrNfe::Association::HaveAddress
|
5
|
+
end
|
6
|
+
class NewClassEndereco < BrNfe::ActiveModelBase
|
7
|
+
end
|
8
|
+
|
9
|
+
describe HaveAddressTest do
|
10
|
+
subject { HaveAddressTest.new(endereco: endereco) }
|
11
|
+
let(:endereco) { BrNfe::Endereco.new }
|
12
|
+
|
13
|
+
it 'Já_inicia_com_um_endereco' do
|
14
|
+
subject.class.new.endereco.class.must_equal BrNfe::Endereco
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'Mesmo_setando_o_endereço_como_nil_retorna_um_novo_endereco' do
|
18
|
+
subject.endereco = nil
|
19
|
+
subject.endereco.must_be_kind_of BrNfe::Endereco
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'deve_manter_o_objeto_endereco_se_ja_tiver' do
|
23
|
+
subject.endereco.must_equal endereco
|
24
|
+
endereco.cep = 'nova-www'
|
25
|
+
subject.endereco.cep.must_equal 'nova-www'
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'Se_setar_o_endereco_com_outra_class_deve_ignorar' do
|
29
|
+
subject.endereco = 7777
|
30
|
+
subject.endereco.must_equal endereco
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'posso_setar_o_endereco_com_um_hash_com_os_parametros_do_endereço' do
|
34
|
+
endereco.assign_attributes(cep: '123456', logradouro: :rua_1, uf: :sc)
|
35
|
+
subject.endereco = {cep: '99999', logradouro: :rua_2, uf: :rs}
|
36
|
+
subject.endereco.cep.must_equal '99999'
|
37
|
+
subject.endereco.logradouro.must_equal 'RUA_2'
|
38
|
+
subject.endereco.uf.must_equal :rs
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'posso_setar_o_endereco_com_um_bloco' do
|
42
|
+
endereco.assign_attributes(cep: '123456', logradouro: :rua_1, uf: :sc)
|
43
|
+
subject.endereco do |address|
|
44
|
+
address.cep = '99999'
|
45
|
+
address.logradouro = :rua_2
|
46
|
+
address.uf = :rs
|
47
|
+
end
|
48
|
+
subject.endereco.cep.must_equal '99999'
|
49
|
+
subject.endereco.logradouro.must_equal 'RUA_2'
|
50
|
+
subject.endereco.uf.must_equal :rs
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'posso_mudar_o_objeto_endereco' do
|
54
|
+
novo_endereco = FactoryGirl.build(:endereco)
|
55
|
+
subject.endereco = novo_endereco
|
56
|
+
subject.endereco.must_equal novo_endereco
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'posso_modificar_a_class_do_address' do
|
60
|
+
BrNfe.endereco_class = NewClassEndereco
|
61
|
+
subject.endereco.class.must_equal NewClassEndereco
|
62
|
+
BrNfe.endereco_class = BrNfe::Endereco
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class HaveCondicaoPagamentoTest < BrNfe::ActiveModelBase
|
4
|
+
include BrNfe::Association::HaveCondicaoPagamento
|
5
|
+
end
|
6
|
+
class NewClassCondicaoPagamento < BrNfe::ActiveModelBase
|
7
|
+
attr_accessor :condicao
|
8
|
+
end
|
9
|
+
|
10
|
+
describe HaveCondicaoPagamentoTest do
|
11
|
+
subject { HaveCondicaoPagamentoTest.new(condicao_pagamento: condicao_pagamento) }
|
12
|
+
let(:condicao_pagamento) { BrNfe::CondicaoPagamento.new }
|
13
|
+
|
14
|
+
it 'deve_iniciar_o_condicao_pagamento_com_nil' do
|
15
|
+
subject.class.new.condicao_pagamento.must_be_nil
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'se_tiver_condicao_pagamento_posso_setalo_como_nil' do
|
19
|
+
subject.condicao_pagamento.wont_be_nil
|
20
|
+
subject.condicao_pagamento = nil
|
21
|
+
subject.condicao_pagamento.must_be_nil
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'deve_manter_o_objeto_condicao_pagamento_se_ja_tiver' do
|
25
|
+
subject.condicao_pagamento.must_equal condicao_pagamento
|
26
|
+
condicao_pagamento.condicao = 'nova-www'
|
27
|
+
subject.condicao_pagamento.condicao.must_equal 'nova-www'
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'Se_setar_o_condicao_pagamento_com_outra_class_deve_ignorar' do
|
31
|
+
subject.condicao_pagamento = 7777
|
32
|
+
subject.condicao_pagamento.must_equal condicao_pagamento
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'posso_setar_o_condicao_pagamento_com_um_hash_com_os_parametros_do_condicao_pagamento' do
|
36
|
+
condicao_pagamento.assign_attributes(condicao: '123456')
|
37
|
+
subject.condicao_pagamento = {condicao: '99999'}
|
38
|
+
subject.condicao_pagamento.condicao.must_equal '99999'
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'ao_setar_um_condicao_pagamento_com_um_hash_e_nao_tiver_um_condicao_pagamento_deve_instanciar_um_com_os_parametros' do
|
42
|
+
subject.condicao_pagamento = nil
|
43
|
+
subject.condicao_pagamento = {condicao: '99999'}
|
44
|
+
subject.condicao_pagamento.condicao.must_equal '99999'
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'posso_setar_o_condicao_pagamento_com_um_bloco' do
|
48
|
+
condicao_pagamento.assign_attributes(condicao: '123456')
|
49
|
+
subject.condicao_pagamento do |address|
|
50
|
+
address.condicao = '99999'
|
51
|
+
end
|
52
|
+
subject.condicao_pagamento.condicao.must_equal '99999'
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'ao_setar_um_condicao_pagamento_com_um_bloco_e_nao_tiver_um_condicao_pagamento_deve_instanciar_um_com_os_parametros' do
|
56
|
+
subject.condicao_pagamento = nil
|
57
|
+
subject.condicao_pagamento do |address|
|
58
|
+
address.condicao = '99999'
|
59
|
+
end
|
60
|
+
subject.condicao_pagamento.condicao.must_equal '99999'
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'posso_mudar_o_objeto_condicao_pagamento' do
|
64
|
+
novo_condicao_pagamento = FactoryGirl.build(:condicao_pagamento)
|
65
|
+
subject.condicao_pagamento = novo_condicao_pagamento
|
66
|
+
subject.condicao_pagamento.must_equal novo_condicao_pagamento
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'posso_modificar_a_class_do_condicao_pagamento' do
|
70
|
+
BrNfe.condicao_pagamento_class = NewClassCondicaoPagamento
|
71
|
+
novo_objeto = subject.class.new(condicao_pagamento: {condicao: '123'})
|
72
|
+
novo_objeto.condicao_pagamento.class.must_equal NewClassCondicaoPagamento
|
73
|
+
BrNfe.condicao_pagamento_class = BrNfe::CondicaoPagamento
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class HaveDestinatarioTest < BrNfe::ActiveModelBase
|
4
|
+
include BrNfe::Association::HaveDestinatario
|
5
|
+
end
|
6
|
+
class NewClassDestinatario < BrNfe::Person
|
7
|
+
end
|
8
|
+
|
9
|
+
describe HaveDestinatarioTest do
|
10
|
+
subject { HaveDestinatarioTest.new(destinatario: destinatario) }
|
11
|
+
let(:destinatario) { BrNfe::Person.new }
|
12
|
+
|
13
|
+
before do
|
14
|
+
HaveDestinatarioTest.any_instance.stubs(:destinatario_class).returns(BrNfe::Person)
|
15
|
+
end
|
16
|
+
it 'Já_inicia_com_um_destinatario' do
|
17
|
+
subject.class.new.destinatario.class.must_equal BrNfe::Person
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'Mesmo_setando_o_destinatario_como_nil_retorna_um_novo_destinatario' do
|
21
|
+
destinatario
|
22
|
+
subject.destinatario = nil
|
23
|
+
subject.destinatario.class.must_equal BrNfe::Person
|
24
|
+
subject.destinatario.wont_equal destinatario
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'deve_manter_o_objeto_destinatario_se_ja_tiver' do
|
28
|
+
subject.destinatario.must_equal destinatario
|
29
|
+
destinatario.cpf_cnpj = 'nova-www'
|
30
|
+
subject.destinatario.cpf_cnpj.must_equal 'nova-www'
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'Se_setar_o_destinatario_com_outra_class_deve_ignorar' do
|
34
|
+
subject.destinatario = 7777
|
35
|
+
subject.destinatario.must_equal destinatario
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'posso_setar_o_destinatario_com_um_hash_com_os_parametros_do_destinatario' do
|
39
|
+
destinatario.assign_attributes(cpf_cnpj: '123456', telefone: '123465', email: 'mail@mail.com')
|
40
|
+
subject.destinatario = {cpf_cnpj: '99999', telefone: '654389', email: 'mail2'}
|
41
|
+
subject.destinatario.cpf_cnpj.must_equal '99999'
|
42
|
+
subject.destinatario.telefone.must_equal '654389'
|
43
|
+
subject.destinatario.email.must_equal 'mail2'
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'posso_setar_o_destinatario_com_um_bloco' do
|
47
|
+
destinatario.assign_attributes(cpf_cnpj: '123456', telefone: '11111', email: 'mail1')
|
48
|
+
subject.destinatario do |address|
|
49
|
+
address.cpf_cnpj = '99999'
|
50
|
+
address.telefone = '11111'
|
51
|
+
address.email = 'mail1'
|
52
|
+
end
|
53
|
+
subject.destinatario.cpf_cnpj.must_equal '99999'
|
54
|
+
subject.destinatario.telefone.must_equal '11111'
|
55
|
+
subject.destinatario.email.must_equal 'mail1'
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'posso_mudar_o_objeto_destinatario' do
|
59
|
+
novo_destinatario = FactoryGirl.build(:service_destinatario)
|
60
|
+
subject.destinatario = novo_destinatario
|
61
|
+
subject.destinatario.must_equal novo_destinatario
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'posso_modificar_a_class_do_destinatario através do método destinatario_class' do
|
65
|
+
HaveDestinatarioTest.any_instance.stubs(:destinatario_class).returns(NewClassDestinatario)
|
66
|
+
novo_objeto = subject.class.new
|
67
|
+
novo_objeto.destinatario.class.must_equal NewClassDestinatario
|
68
|
+
end
|
69
|
+
|
70
|
+
it "por padrão a class destinatario_class deve retornar uma exceção" do
|
71
|
+
HaveDestinatarioTest.any_instance.unstub(:destinatario_class)
|
72
|
+
assert_raises RuntimeError do
|
73
|
+
subject.destinatario_class
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class HaveEmitenteTest < BrNfe::ActiveModelBase
|
4
|
+
include BrNfe::Association::HaveEmitente
|
5
|
+
end
|
6
|
+
class NewClassEmitente < BrNfe::Person
|
7
|
+
end
|
8
|
+
|
9
|
+
describe HaveEmitenteTest do
|
10
|
+
subject { HaveEmitenteTest.new(emitente: emitente) }
|
11
|
+
let(:emitente) { BrNfe::Person.new }
|
12
|
+
|
13
|
+
before do
|
14
|
+
HaveEmitenteTest.any_instance.stubs(:emitente_class).returns(BrNfe::Person)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'por padrão Já_inicia_com_um_emitente' do
|
18
|
+
subject.class.new.emitente.must_be_kind_of BrNfe::Person
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'Mesmo_setando_o_emitente_como_nil_retorna_um_novo_emitente' do
|
22
|
+
subject.emitente = nil
|
23
|
+
subject.emitente.must_be_kind_of BrNfe::Person
|
24
|
+
subject.emitente.wont_equal emitente
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'deve_manter_o_objeto_emitente_se_ja_tiver' do
|
28
|
+
subject.emitente.must_equal emitente
|
29
|
+
emitente.cnpj = 'nova-www'
|
30
|
+
subject.emitente.cnpj.must_equal 'nova-www'
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'Se_setar_o_emitente_com_outra_class_deve_ignorar' do
|
34
|
+
subject.emitente = 7777
|
35
|
+
subject.emitente.must_equal emitente
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'posso_setar_o_emitente_com_um_hash_com_os_parametros_do_emitente' do
|
39
|
+
emitente.assign_attributes(razao_social: 'JOAO', cnpj: '123456', telefone: '123465', email: 'mail@mail.com')
|
40
|
+
subject.emitente = {cnpj: '99999', telefone: '654389', email: 'mail2'}
|
41
|
+
subject.emitente.cnpj.must_equal '99999'
|
42
|
+
subject.emitente.telefone.must_equal '654389'
|
43
|
+
subject.emitente.email.must_equal 'mail2'
|
44
|
+
subject.emitente.razao_social.must_equal 'JOAO'
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'posso_setar_o_emitente_com_um_bloco' do
|
48
|
+
emitente.assign_attributes(razao_social: 'JOAO', cnpj: '123456', telefone: '11111', email: 'mail1')
|
49
|
+
subject.emitente do |address|
|
50
|
+
address.cnpj = '99999'
|
51
|
+
address.telefone = '11111'
|
52
|
+
address.email = 'mail1'
|
53
|
+
end
|
54
|
+
subject.emitente.cnpj.must_equal '99999'
|
55
|
+
subject.emitente.telefone.must_equal '11111'
|
56
|
+
subject.emitente.email.must_equal 'mail1'
|
57
|
+
subject.emitente.razao_social.must_equal 'JOAO'
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'posso_mudar_o_objeto_emitente' do
|
61
|
+
subject.emitente.wont_be_nil
|
62
|
+
novo_emitente = BrNfe::Person.new
|
63
|
+
subject.emitente = novo_emitente
|
64
|
+
subject.emitente.must_equal novo_emitente
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'posso_modificar_a_class_do_emitente através do método emitente_class' do
|
68
|
+
HaveEmitenteTest.any_instance.stubs(:emitente_class).returns(NewClassEmitente)
|
69
|
+
novo_objeto = subject.class.new
|
70
|
+
novo_objeto.emitente.class.must_equal NewClassEmitente
|
71
|
+
end
|
72
|
+
|
73
|
+
it "por padrão a class emitente_class deve retornar uma exceção" do
|
74
|
+
HaveEmitenteTest.any_instance.unstub(:emitente_class)
|
75
|
+
assert_raises RuntimeError do
|
76
|
+
subject.emitente_class
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
end
|