From 8b5cd59867b00829dfe9d38531d44f1fdf4edbdc Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 24 Dec 2012 02:14:02 -0800 Subject: remove cruft --- test/test_helper.rb | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'test/test_helper.rb') diff --git a/test/test_helper.rb b/test/test_helper.rb index 031a90f..517ae78 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -39,37 +39,4 @@ class MiniTest::Unit::TestCase ).to_return(options) end - #def without_webmock - # WebMock.disable_net_connect!(:allow_localhost => true) - # yield - # WebMock.disable_net_connect! - #end -end - -# -# a simple EM connection with callbacks for various lifecycle stages, -# useful for testing -# -class TestSocketClient < EventMachine::Connection - attr_writer :onopen, :onclose, :onmessage - attr_reader :data - - def initialize - @state = :new - @data = [] - end - - def receive_data(data) - @data << data - if @state == :new - @onopen.call if @onopen - @state = :open - else - @onmessage.call(data) if @onmessage - end - end - - def unbind - @onclose.call if @onclose - end end -- cgit v1.2.3