spec/integration/draft76_spec.rb in em-websocket-0.3.8 vs spec/integration/draft76_spec.rb in em-websocket-0.4.0
- old
+ new
@@ -33,10 +33,12 @@
:body => "8jKS\'y:G*Co,Wxa-"
}
end
it_behaves_like "a websocket server" do
+ let(:version) { 76 }
+
def start_server
EM::WebSocket.start(:host => "0.0.0.0", :port => 12345) { |ws|
yield ws
}
end
@@ -183,10 +185,10 @@
it "should handle invalid http requests by raising HandshakeError passed to onerror callback" do
em {
EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 12345) { |server|
server.onerror { |error|
error.should be_an_instance_of EM::WebSocket::HandshakeError
- error.message.should == "Invalid HTTP header"
+ error.message.should == "Invalid HTTP header: Could not parse data entirely"
done
}
}
client = EM.connect('0.0.0.0', 12345, FakeWebSocketClient)