spec/celluloid/io/ssl_server_spec.rb in celluloid-io-0.16.2 vs spec/celluloid/io/ssl_server_spec.rb in celluloid-io-0.16.5.pre0

- old
+ new

@@ -23,58 +23,58 @@ let(:payload) { 'ohai' } context "inside Celluloid::IO" do it "should be evented" do with_ssl_server do |subject| - within_io_actor { Celluloid::IO.evented? }.should be_true + expect(within_io_actor { Celluloid::IO.evented? }).to be_truthy end end it "accepts a connection and returns a Celluloid::IO::SSLSocket" do with_ssl_server do |subject| thread = Thread.new do raw = TCPSocket.new(example_addr, example_ssl_port) OpenSSL::SSL::SSLSocket.new(raw, client_context).connect end peer = within_io_actor { subject.accept } - peer.should be_a Celluloid::IO::SSLSocket + expect(peer).to be_a Celluloid::IO::SSLSocket client = thread.value client.write payload - peer.read(payload.size).should eq payload + expect(peer.read(payload.size)).to eq payload end end end context "outside Celluloid::IO" do it "should be blocking" do with_ssl_server do |subject| - Celluloid::IO.should_not be_evented + expect(Celluloid::IO).not_to be_evented end end it "accepts a connection and returns a Celluloid::IO::SSLSocket" do with_ssl_server do |subject| thread = Thread.new do raw = TCPSocket.new(example_addr, example_ssl_port) OpenSSL::SSL::SSLSocket.new(raw, client_context).connect end peer = subject.accept - peer.should be_a Celluloid::IO::SSLSocket + expect(peer).to be_a Celluloid::IO::SSLSocket client = thread.value client.write payload - peer.read(payload.size).should eq payload + expect(peer.read(payload.size)).to eq payload end end end end describe "#initialize" do it "should auto-wrap a raw ::TCPServer" do raw_server = ::TCPServer.new(example_addr, example_ssl_port) with_ssl_server(raw_server) do |ssl_server| - ssl_server.tcp_server.class.should == Celluloid::IO::TCPServer + expect(ssl_server.tcp_server.class).to eq(Celluloid::IO::TCPServer) end end end def with_ssl_server(raw_server = nil)