Sha256: d9a549b0669448d5b3bdeb768459241303d564d6f8a267a1a24eaf2be93ff05a
Contents?: true
Size: 598 Bytes
Versions: 3
Compression:
Stored size: 598 Bytes
Contents
# encoding: UTF-8 def fake_request_for(response) FakeWeb.register_uri(:get, Regexp.new("http://ws.correios.com.br/calculador/CalcPrecoPrazo.aspx"), :status => 200, :body => body_for(response)) end def body_for(response) case response when :success_response_one_service File.open(File.dirname(__FILE__) + "/responses/success-response-one-service.xml").read when :success_response_many_services File.open(File.dirname(__FILE__) + "/responses/success-response-many-services.xml").read else response end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
correios-frete-1.5.1 | spec/support/fake_request.rb |
correios-frete-1.5.0 | spec/support/fake_request.rb |
correios-frete-1.4.0 | spec/support/fake_request.rb |