spec/integration/draft06_spec.rb in em-websocket-0.5.0 vs spec/integration/draft06_spec.rb in em-websocket-0.5.1
- old
+ new
@@ -1,7 +1,6 @@
require 'helper'
-require 'integration/shared_examples'
describe "draft06" do
include EM::SpecHelper
default_timeout 1
@@ -28,24 +27,22 @@
"Connection" => "Upgrade",
"Sec-WebSocket-Accept" => "s3pPLMBiTxaQ9kYGzzhZRbK+xOo=",
}
}
end
-
- def start_server
- EM::WebSocket.run(:host => "0.0.0.0", :port => 12345) { |ws|
- yield ws if block_given?
- }
- end
def start_client
client = EM.connect('0.0.0.0', 12345, Draft05FakeWebSocketClient)
client.send_data(format_request(@request))
yield client if block_given?
return client
end
it_behaves_like "a websocket server" do
+ let(:version) { 6 }
+ end
+
+ it_behaves_like "a WebSocket server drafts 3 and above" do
let(:version) { 6 }
end
it "should open connection" do
em {