summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-12-24 02:14:02 -0800
committerelijah <elijah@riseup.net>2012-12-24 02:14:02 -0800
commit8b5cd59867b00829dfe9d38531d44f1fdf4edbdc (patch)
tree228446a835bf9e604fd464900e4481d0b00707a1 /test
parent457c2bf135be68b3c49ff20d3f23a6f8507aeda5 (diff)
remove cruft
Diffstat (limited to 'test')
-rw-r--r--test/test_helper.rb33
-rw-r--r--test/unit/server_test.rb7
2 files changed, 0 insertions, 40 deletions
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
diff --git a/test/unit/server_test.rb b/test/unit/server_test.rb
index ba462d0..e4c2dc6 100644
--- a/test/unit/server_test.rb
+++ b/test/unit/server_test.rb
@@ -20,13 +20,6 @@ class ServerTest < MiniTest::Unit::TestCase
puts http.error
EM.stop
}
-
- #socket = EM.connect('0.0.0.0', Nickserver::Config.port, TestSocketClient)
- #socket.onopen = lambda {
- # server.players.size.should == 1
- # socket.data.last.chomp.should == "READY"
- # EM.stop
- #}
end
end