summaryrefslogtreecommitdiff
path: root/spec/ruby/library/socket/udpsocket/new_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/socket/udpsocket/new_spec.rb')
-rw-r--r--spec/ruby/library/socket/udpsocket/new_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/library/socket/udpsocket/new_spec.rb b/spec/ruby/library/socket/udpsocket/new_spec.rb
index 79bfcb624d..aff111927c 100644
--- a/spec/ruby/library/socket/udpsocket/new_spec.rb
+++ b/spec/ruby/library/socket/udpsocket/new_spec.rb
@@ -8,22 +8,22 @@ describe 'UDPSocket.new' do
it 'without arguments' do
@socket = UDPSocket.new
- @socket.should be_an_instance_of(UDPSocket)
+ @socket.should.instance_of?(UDPSocket)
end
it 'using Integer argument' do
@socket = UDPSocket.new(Socket::AF_INET)
- @socket.should be_an_instance_of(UDPSocket)
+ @socket.should.instance_of?(UDPSocket)
end
it 'using Symbol argument' do
@socket = UDPSocket.new(:INET)
- @socket.should be_an_instance_of(UDPSocket)
+ @socket.should.instance_of?(UDPSocket)
end
it 'using String argument' do
@socket = UDPSocket.new('INET')
- @socket.should be_an_instance_of(UDPSocket)
+ @socket.should.instance_of?(UDPSocket)
end
it "does not use the given block and warns to use UDPSocket::open" do
@@ -33,8 +33,8 @@ describe 'UDPSocket.new' do
end
it 'raises Errno::EAFNOSUPPORT or Errno::EPROTONOSUPPORT if unsupported family passed' do
- -> { UDPSocket.new(-1) }.should raise_error(SystemCallError) { |e|
- [Errno::EAFNOSUPPORT, Errno::EPROTONOSUPPORT].should include(e.class)
+ -> { UDPSocket.new(-1) }.should.raise(SystemCallError) { |e|
+ [Errno::EAFNOSUPPORT, Errno::EPROTONOSUPPORT].should.include?(e.class)
}
end
end