diff options
Diffstat (limited to 'spec/ruby/library/socket/udpsocket/send_spec.rb')
| -rw-r--r-- | spec/ruby/library/socket/udpsocket/send_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/library/socket/udpsocket/send_spec.rb b/spec/ruby/library/socket/udpsocket/send_spec.rb index 5d5de684af..63f5b0dcc6 100644 --- a/spec/ruby/library/socket/udpsocket/send_spec.rb +++ b/spec/ruby/library/socket/udpsocket/send_spec.rb @@ -34,7 +34,7 @@ describe "UDPSocket#send" do @msg[0].should == "ad hoc" @msg[1][0].should == "AF_INET" - @msg[1][1].should be_kind_of(Integer) + @msg[1][1].should.is_a?(Integer) @msg[1][3].should == "127.0.0.1" end @@ -46,7 +46,7 @@ describe "UDPSocket#send" do @msg[0].should == "ad hoc" @msg[1][0].should == "AF_INET" - @msg[1][1].should be_kind_of(Integer) + @msg[1][1].should.is_a?(Integer) @msg[1][3].should == "127.0.0.1" end @@ -59,16 +59,16 @@ describe "UDPSocket#send" do @msg[0].should == "connection-based" @msg[1][0].should == "AF_INET" - @msg[1][1].should be_kind_of(Integer) + @msg[1][1].should.is_a?(Integer) @msg[1][3].should == "127.0.0.1" end - it "raises EMSGSIZE if data is too too big" do + it "raises EMSGSIZE if data is too big" do @socket = UDPSocket.open begin -> do @socket.send('1' * 100_000, 0, SocketSpecs.hostname, @port.to_s) - end.should raise_error(Errno::EMSGSIZE) + end.should.raise(Errno::EMSGSIZE) ensure @socket.send("ad hoc", 0, SocketSpecs.hostname, @port) @socket.close @@ -96,7 +96,7 @@ describe 'UDPSocket#send' do describe 'using a disconnected socket' do describe 'without a destination address' do it "raises #{SocketSpecs.dest_addr_req_error}" do - -> { @client.send('hello', 0) }.should raise_error(SocketSpecs.dest_addr_req_error) + -> { @client.send('hello', 0) }.should.raise(SocketSpecs.dest_addr_req_error) end end @@ -108,7 +108,7 @@ describe 'UDPSocket#send' do it 'does not persist the connection after sending data' do @client.send('hello', 0, @addr.ip_address, @addr.ip_port) - -> { @client.send('hello', 0) }.should raise_error(SocketSpecs.dest_addr_req_error) + -> { @client.send('hello', 0) }.should.raise(SocketSpecs.dest_addr_req_error) end end |
