Sha256: 3ad872967474226e57a547462fe70e0fb0b909f390e4fe48874d363ceac58b90
Contents?: true
Size: 641 Bytes
Versions: 15
Compression:
Stored size: 641 Bytes
Contents
module VCRStubHelpers def interactions_from(file) hashes = YAML.load_file(File.join(VCR::SPEC_ROOT, 'fixtures', file))['http_interactions'] hashes.map { |h| VCR::HTTPInteraction.from_hash(h) } end def stub_requests(*args) VCR.stub(:http_interactions => VCR::Cassette::HTTPInteractionList.new(*args)) end def http_interaction(url, response_body = "FOO!", status_code = 200) request = VCR::Request.new(:get, request_url) response_status = VCR::ResponseStatus.new(status_code) response = VCR::Response.new(response_status, nil, response_body, '1.1') VCR::HTTPInteraction.new(request, response) end end
Version data entries
15 entries across 15 versions & 1 rubygems