spec/integration/draft13_spec.rb in em-websocket-0.5.0 vs spec/integration/draft13_spec.rb in em-websocket-0.5.1
- old
+ new
@@ -1,9 +1,8 @@
# encoding: BINARY
require 'helper'
-require 'integration/shared_examples'
describe "draft13" do
include EM::SpecHelper
default_timeout 1
@@ -31,23 +30,21 @@
"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, Draft07FakeWebSocketClient)
client.send_data(format_request(@request))
yield client if block_given?
return client
end
it_behaves_like "a websocket server" do
+ let(:version) { 13 }
+ end
+
+ it_behaves_like "a WebSocket server drafts 3 and above" do
let(:version) { 13 }
end
it "should send back the correct handshake response" do
em {