spec/integration/draft75_spec.rb in em-websocket-0.3.8 vs spec/integration/draft75_spec.rb in em-websocket-0.4.0
- old
+ new
@@ -8,10 +8,12 @@
describe "WebSocket server draft75" do
include EM::SpecHelper
default_timeout 1
it_behaves_like "a websocket server" do
+ let(:version) { 75 }
+
def start_server
EM::WebSocket.start(:host => "0.0.0.0", :port => 12345) { |ws|
yield ws
}
end
@@ -106,10 +108,10 @@
EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 12345) do |ws|
ws.onopen { fail }
ws.onclose { EventMachine.stop }
ws.onerror {|e|
e.should be_an_instance_of EventMachine::WebSocket::HandshakeError
- e.message.should match('Connection and Upgrade headers required')
+ e.message.should match('Not an upgrade request')
EventMachine.stop
}
end
}
end