Skip to content

Commit

Permalink
Remove string concatenation in parser spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
prodis committed Mar 18, 2017
1 parent 3685128 commit ae305d6
Showing 1 changed file with 55 additions and 55 deletions.
110 changes: 55 additions & 55 deletions spec/correios/cep/parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@
context 'when address is found' do
context 'and does not have complement' do
let(:xml) do
'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
'<soap:Body>' +
'<ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">' +
'<return>' +
'<bairro>Cavaleiro</bairro>' +
'<cep>54250610</cep>' +
'<cidade>Jaboatão dos Guararapes</cidade>' +
'<complemento></complemento>' +
'<complemento2></complemento2>' +
'<end>Rua Fernando Amorim</end>' +
'<id>0</id>' +
'<uf>PE</uf>' +
'</return>' +
'</ns2:consultaCEPResponse>' +
'</soap:Body>' +
'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' \
'<soap:Body>' \
'<ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">' \
'<return>' \
'<bairro>Cavaleiro</bairro>' \
'<cep>54250610</cep>' \
'<cidade>Jaboatão dos Guararapes</cidade>' \
'<complemento></complemento>' \
'<complemento2></complemento2>' \
'<end>Rua Fernando Amorim</end>' \
'<id>0</id>' \
'<uf>PE</uf>' \
'</return>' \
'</ns2:consultaCEPResponse>' \
'</soap:Body>' \
'</soap:Envelope>'
end

Expand All @@ -41,21 +41,21 @@

context 'and has one complement' do
let(:xml) do
'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
'<soap:Body>' +
'<ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">' +
'<return>' +
'<bairro>Cavaleiro</bairro>' +
'<cep>54250610</cep>' +
'<cidade>Jaboatão dos Guararapes</cidade>' +
'<complemento>de 1500 até o fim</complemento>' +
'<complemento2></complemento2>' +
'<end>Rua Fernando Amorim</end>' +
'<id>0</id>' +
'<uf>PE</uf>' +
'</return>' +
'</ns2:consultaCEPResponse>' +
'</soap:Body>' +
'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' \
'<soap:Body>' \
'<ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">' \
'<return>' \
'<bairro>Cavaleiro</bairro>' \
'<cep>54250610</cep>' \
'<cidade>Jaboatão dos Guararapes</cidade>' \
'<complemento>de 1500 até o fim</complemento>' \
'<complemento2></complemento2>' \
'<end>Rua Fernando Amorim</end>' \
'<id>0</id>' \
'<uf>PE</uf>' \
'</return>' \
'</ns2:consultaCEPResponse>' \
'</soap:Body>' \
'</soap:Envelope>'
end

Expand All @@ -68,21 +68,21 @@

context 'and has two complements' do
let(:xml) do
'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
'<soap:Body>' +
'<ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">' +
'<return>' +
'<bairro>Cavaleiro</bairro>' +
'<cep>54250610</cep>' +
'<cidade>Jaboatão dos Guararapes</cidade>' +
'<complemento>de 1500 até o fim</complemento>' +
'<complemento2>(zona mista)</complemento2>' +
'<end>Rua Fernando Amorim</end>' +
'<id>0</id>' +
'<uf>PE</uf>' +
'</return>' +
'</ns2:consultaCEPResponse>' +
'</soap:Body>' +
'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' \
'<soap:Body>' \
'<ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">' \
'<return>' \
'<bairro>Cavaleiro</bairro>' \
'<cep>54250610</cep>' \
'<cidade>Jaboatão dos Guararapes</cidade>' \
'<complemento>de 1500 até o fim</complemento>' \
'<complemento2>(zona mista)</complemento2>' \
'<end>Rua Fernando Amorim</end>' \
'<id>0</id>' \
'<uf>PE</uf>' \
'</return>' \
'</ns2:consultaCEPResponse>' \
'</soap:Body>' \
'</soap:Envelope>'
end

Expand All @@ -96,16 +96,16 @@

context 'when address is not found' do
let(:xml) do
'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
'<soap:Body>' +
'<soap:Fault>' +
'<faultcode>soap:Server</faultcode>' +
'<faultstring>CEP NAO ENCONTRADO</faultstring>' +
'<detail>' +
'<ns2:SigepClienteException xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">CEP NAO ENCONTRADO</ns2:SigepClienteException>' +
'</detail>' +
'</soap:Fault>' +
'</soap:Body>' +
'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' \
'<soap:Body>' \
'<soap:Fault>' \
'<faultcode>soap:Server</faultcode>' \
'<faultstring>CEP NAO ENCONTRADO</faultstring>' \
'<detail>' \
'<ns2:SigepClienteException xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">CEP NAO ENCONTRADO</ns2:SigepClienteException>' \
'</detail>' \
'</soap:Fault>' \
'</soap:Body>' \
'</soap:Envelope>'
end

Expand Down

0 comments on commit ae305d6

Please sign in to comment.