Sha256: 193d6b013dc2035e9d36cc4c41b2c7ca505daf7aa599b690e7a0497619d3ac44

Contents?: true

Size: 313 Bytes

Versions: 34

Compression:

Stored size: 313 Bytes

Contents

class FakeUDPSocket
  attr_reader :buffer

  def initialize
    @buffer = []
  end

  def send(message, *rest)
    @buffer.push [message]
  end

  def recv
    @buffer.shift
  end

  def clear
    @buffer = []
  end

  def to_s
    inspect
  end

  def inspect
    "<FakeUDPSocket: #{@buffer.inspect}>"
  end
end

Version data entries

34 entries across 34 versions & 4 rubygems

Version Path
flipper-0.10.2 spec/support/fake_udp_socket.rb
flipper-0.10.1 spec/support/fake_udp_socket.rb
flipper-0.10.0 spec/support/fake_udp_socket.rb
flipper-0.9.2 spec/support/fake_udp_socket.rb
flipper-0.9.1 spec/support/fake_udp_socket.rb
flipper-0.9.0 spec/support/fake_udp_socket.rb
flipper-0.9.0.beta1 spec/support/fake_udp_socket.rb
flipper-0.8.0 spec/support/fake_udp_socket.rb
flipper-0.7.5 spec/support/fake_udp_socket.rb
flipper-0.7.4 spec/support/fake_udp_socket.rb
flipper-0.7.3 spec/support/fake_udp_socket.rb
flipper-0.7.2 spec/support/fake_udp_socket.rb
flipper-0.7.1 spec/support/fake_udp_socket.rb
flipper-0.7.0 spec/support/fake_udp_socket.rb
flipper-0.7.0.beta6 spec/support/fake_udp_socket.rb
flipper-0.7.0.beta5 spec/support/fake_udp_socket.rb
flipper-0.7.0.beta4 spec/support/fake_udp_socket.rb
flipper-0.7.0.beta3 spec/support/fake_udp_socket.rb
flipper-0.7.0.beta2 spec/support/fake_udp_socket.rb
flipper-0.7.0.beta1 spec/support/fake_udp_socket.rb