Sha256: e557b26d602aea60378a3fd535431a92118dd75a74692354c4255ae309b9a09e
Contents?: true
Size: 677 Bytes
Versions: 25
Compression:
Stored size: 677 Bytes
Contents
module Net remove_const "HTTP" class Request < Struct.new(:host, :port, :query, :post_data, :headers) def post(query, post, headers = {}) self.query = query self.post_data = post self.headers = headers end end class Net::HTTP def initialize(*args) end def self.start(host, port) request = Request.new request.host = host request.port = port @pings ||= [] @pings << request yield request end def self.pings @pings end def self.next_response=(mock_response) @@response = mock_response end def self.get_response(*args) @@response end end end
Version data entries
25 entries across 25 versions & 1 rubygems