diff options
Diffstat (limited to 'spec/ruby/library/socket/ancillarydata')
6 files changed, 25 insertions, 25 deletions
diff --git a/spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb b/spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb index 50763e28b1..c54ee29825 100644 --- a/spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb +++ b/spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb @@ -26,7 +26,7 @@ with_feature :ancillary_data do end it 'raises SocketError when comparing with :IPV6 and :RIGHTS' do - lambda { @data.cmsg_is?(:IPV6, :RIGHTS) }.should raise_error(SocketError) + -> { @data.cmsg_is?(:IPV6, :RIGHTS) }.should raise_error(SocketError) end end end diff --git a/spec/ruby/library/socket/ancillarydata/initialize_spec.rb b/spec/ruby/library/socket/ancillarydata/initialize_spec.rb index d4788d0f68..344d1485c5 100644 --- a/spec/ruby/library/socket/ancillarydata/initialize_spec.rb +++ b/spec/ruby/library/socket/ancillarydata/initialize_spec.rb @@ -113,25 +113,25 @@ with_feature :ancillary_data do end it 'raises TypeError when using a numeric string as the type argument' do - lambda { + -> { Socket::AncillaryData.new(:INET, :IGMP, Socket::SCM_RIGHTS.to_s, '') }.should raise_error(TypeError) end it 'raises SocketError when using :RECVTTL as the type argument' do - lambda { + -> { Socket::AncillaryData.new(:INET, :SOCKET, :RECVTTL, '') }.should raise_error(SocketError) end it 'raises SocketError when using :MOO as the type argument' do - lambda { + -> { Socket::AncillaryData.new(:INET, :SOCKET, :MOO, '') }.should raise_error(SocketError) end it 'raises SocketError when using :IP_RECVTTL as the type argument' do - lambda { + -> { Socket::AncillaryData.new(:INET, :SOCKET, :IP_RECVTTL, '') }.should raise_error(SocketError) end @@ -155,13 +155,13 @@ with_feature :ancillary_data do end it 'raises SocketError when using :RIGHTS as the type argument' do - lambda { + -> { Socket::AncillaryData.new(:INET, :IP, :RIGHTS, '') }.should raise_error(SocketError) end it 'raises SocketError when using :MOO as the type argument' do - lambda { + -> { Socket::AncillaryData.new(:INET, :IP, :MOO, '') }.should raise_error(SocketError) end @@ -179,13 +179,13 @@ with_feature :ancillary_data do end it 'raises SocketError when using :RIGHTS as the type argument' do - lambda { + -> { Socket::AncillaryData.new(:INET, :IPV6, :RIGHTS, '') }.should raise_error(SocketError) end it 'raises SocketError when using :MOO as the type argument' do - lambda { + -> { Socket::AncillaryData.new(:INET, :IPV6, :MOO, '') }.should raise_error(SocketError) end @@ -205,13 +205,13 @@ with_feature :ancillary_data do end it 'raises SocketError when using :RIGHTS as the type argument' do - lambda { + -> { Socket::AncillaryData.new(:INET, :TCP, :RIGHTS, '') }.should raise_error(SocketError) end it 'raises SocketError when using :MOO as the type argument' do - lambda { + -> { Socket::AncillaryData.new(:INET, :TCP, :MOO, '') }.should raise_error(SocketError) end @@ -225,13 +225,13 @@ with_feature :ancillary_data do end it 'raises SocketError when using :RIGHTS as the type argument' do - lambda { + -> { Socket::AncillaryData.new(:INET, :UDP, :RIGHTS, '') }.should raise_error(SocketError) end it 'raises SocketError when using :MOO as the type argument' do - lambda { + -> { Socket::AncillaryData.new(:INET, :UDP, :MOO, '') }.should raise_error(SocketError) end @@ -243,7 +243,7 @@ with_feature :ancillary_data do end it 'raises SocketError when using :CORK sa the type argument' do - lambda { + -> { Socket::AncillaryData.new(:UNIX, :SOCKET, :CORK, '') }.should raise_error(SocketError) end @@ -251,7 +251,7 @@ with_feature :ancillary_data do describe 'using :AF_UNIX as the family and :IP as the level' do it 'raises SocketError' do - lambda { + -> { Socket::AncillaryData.new(:UNIX, :IP, :RECVTTL, '') }.should raise_error(SocketError) end @@ -259,7 +259,7 @@ with_feature :ancillary_data do describe 'using :AF_UNIX as the family and :IPV6 as the level' do it 'raises SocketError' do - lambda { + -> { Socket::AncillaryData.new(:UNIX, :IPV6, :NEXTHOP, '') }.should raise_error(SocketError) end @@ -267,7 +267,7 @@ with_feature :ancillary_data do describe 'using :AF_UNIX as the family and :TCP as the level' do it 'raises SocketError' do - lambda { + -> { Socket::AncillaryData.new(:UNIX, :TCP, :CORK, '') }.should raise_error(SocketError) end @@ -275,7 +275,7 @@ with_feature :ancillary_data do describe 'using :AF_UNIX as the family and :UDP as the level' do it 'raises SocketError' do - lambda { + -> { Socket::AncillaryData.new(:UNIX, :UDP, :CORK, '') }.should raise_error(SocketError) end diff --git a/spec/ruby/library/socket/ancillarydata/int_spec.rb b/spec/ruby/library/socket/ancillarydata/int_spec.rb index 0d7c5e3652..fe41a30a1a 100644 --- a/spec/ruby/library/socket/ancillarydata/int_spec.rb +++ b/spec/ruby/library/socket/ancillarydata/int_spec.rb @@ -37,7 +37,7 @@ with_feature :ancillary_data do it 'raises when the data is not an Integer' do data = Socket::AncillaryData.new(:UNIX, :SOCKET, :RIGHTS, 'ugh') - lambda { data.int }.should raise_error(TypeError) + -> { data.int }.should raise_error(TypeError) end end end diff --git a/spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb b/spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb index 9fc4e8c201..84910a038a 100644 --- a/spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb +++ b/spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb @@ -89,7 +89,7 @@ with_feature :ancillary_data, :pktinfo do end it 'is not the same object as the input Addrinfo' do - @addr.should_not.equal? @source + @addr.should_not equal @source end end @@ -109,7 +109,7 @@ with_feature :ancillary_data, :pktinfo do end it 'is not the same object as the input Addrinfo' do - @addr.should_not.equal? @dest + @addr.should_not equal @dest end end end diff --git a/spec/ruby/library/socket/ancillarydata/ipv6_pktinfo_spec.rb b/spec/ruby/library/socket/ancillarydata/ipv6_pktinfo_spec.rb index 6f576f5169..0fffc720dc 100644 --- a/spec/ruby/library/socket/ancillarydata/ipv6_pktinfo_spec.rb +++ b/spec/ruby/library/socket/ancillarydata/ipv6_pktinfo_spec.rb @@ -58,7 +58,7 @@ with_feature :ancillary_data, :ipv6_pktinfo do end it 'is not the same object as the input Addrinfo' do - @addr.should_not.equal? @source + @addr.should_not equal @source end end diff --git a/spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb b/spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb index 34d954af81..65ffcb01af 100644 --- a/spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb +++ b/spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb @@ -26,7 +26,7 @@ with_feature :ancillary_data do describe 'using non IO objects' do it 'raises TypeError' do - lambda { Socket::AncillaryData.unix_rights(10) }.should raise_error(TypeError) + -> { Socket::AncillaryData.unix_rights(10) }.should raise_error(TypeError) end end end @@ -47,14 +47,14 @@ with_feature :ancillary_data do it 'raises TypeError when the level is not SOL_SOCKET' do data = Socket::AncillaryData.new(:INET, :IP, :RECVTTL, '') - lambda { data.unix_rights }.should raise_error(TypeError) + -> { data.unix_rights }.should raise_error(TypeError) end platform_is_not :"solaris2.10", :aix do it 'raises TypeError when the type is not SCM_RIGHTS' do data = Socket::AncillaryData.new(:INET, :SOCKET, :TIMESTAMP, '') - lambda { data.unix_rights }.should raise_error(TypeError) + -> { data.unix_rights }.should raise_error(TypeError) end end end |