Sha256: 3776cb7e34adf0f5c27309c1a28a139b9722e973619d1b97241e6a93c86f4394

Contents?: true

Size: 368 Bytes

Versions: 2

Compression:

Stored size: 368 Bytes

Contents

class FakeConnection

  attr_reader :read_data, :response

  def self.with_request(version, name, params = {})
    request = Sanford::Protocol::Request.new(version, name, params)
    self.new(request.to_hash)
  end

  def initialize(read_data)
    @read_data = read_data
  end

  def write_data(data)
    @response = Sanford::Protocol::Response.parse(data)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sanford-0.3.0 test/support/fake_connection.rb
sanford-0.2.0 test/support/fake_connection.rb