Sha256: a381b03359b87c025a494cf3c7cd0a8bdacc4f2679da081c90403158bd592a8e
Contents?: true
Size: 599 Bytes
Versions: 4
Compression:
Stored size: 599 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
4 entries across 4 versions & 1 rubygems