require 'hara/base' Celluloid.logger = nil class FayeHandshake def headers_downcased {'host' => 'localhost:8080'} end end class FayeSocket attr_accessor :remote_ip def initialize @client_messages = [] @server_messages = [] end def alive? @alive end def close @alive = false end def send message @client_messages << message end def client_read @client_messages.shift end end