Sha256: 5340ef80a6e4da3c86c42a8f9df053f3c11b4fde136cd035a829e512f97722d8
Contents?: true
Size: 555 Bytes
Versions: 1
Compression:
Stored size: 555 Bytes
Contents
require 'spec_helper' describe Correios::CEP::AddressFinder do let(:cep) { "54250610" } let(:web_service_response) { "<end>Rua Fernando Amorim</end>" } let(:address) { { address: "Rua Fernando Amorim" } } describe "#get" do before do Correios::CEP::WebService.any_instance.stub(:request!).with(cep).and_return(web_service_response) Correios::CEP::Parser.any_instance.stub(:address).with(web_service_response).and_return(address) end it "returns address" do expect(subject.get(cep)).to eq address end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
correios-cep-0.1.0 | spec/correios/cep/address_finder_spec.rb |