Sha256: e6c9bc57a84dd7647fb2be2099ca1ac41f759c521d1e1132b3843c3f4eebc69c

Contents?: true

Size: 314 Bytes

Versions: 71

Compression:

Stored size: 314 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

71 entries across 71 versions & 1 rubygems

Version Path
flipper-1.3.2 spec/support/fake_udp_socket.rb
flipper-1.3.1 spec/support/fake_udp_socket.rb
flipper-1.3.0 spec/support/fake_udp_socket.rb
flipper-1.3.0.pre spec/support/fake_udp_socket.rb
flipper-1.2.2 spec/support/fake_udp_socket.rb
flipper-1.2.1 spec/support/fake_udp_socket.rb
flipper-1.2.0 spec/support/fake_udp_socket.rb
flipper-1.1.2 spec/support/fake_udp_socket.rb
flipper-1.1.1 spec/support/fake_udp_socket.rb
flipper-1.1.0 spec/support/fake_udp_socket.rb
flipper-1.0.0 spec/support/fake_udp_socket.rb
flipper-1.0.0.pre spec/support/fake_udp_socket.rb
flipper-0.28.3 spec/support/fake_udp_socket.rb
flipper-0.28.2 spec/support/fake_udp_socket.rb
flipper-0.28.1 spec/support/fake_udp_socket.rb
flipper-0.28.0 spec/support/fake_udp_socket.rb
flipper-0.27.1 spec/support/fake_udp_socket.rb
flipper-0.27.0 spec/support/fake_udp_socket.rb
flipper-0.26.2 spec/support/fake_udp_socket.rb
flipper-0.26.1 spec/support/fake_udp_socket.rb