diff options
Diffstat (limited to 'spec/ruby/library/socket/udpsocket/write_spec.rb')
| -rw-r--r-- | spec/ruby/library/socket/udpsocket/write_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/library/socket/udpsocket/write_spec.rb b/spec/ruby/library/socket/udpsocket/write_spec.rb index 11e38bb470..d41ee078d8 100644 --- a/spec/ruby/library/socket/udpsocket/write_spec.rb +++ b/spec/ruby/library/socket/udpsocket/write_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../../spec_helper', __FILE__) -require File.expand_path('../../fixtures/classes', __FILE__) +require_relative '../spec_helper' +require_relative '../fixtures/classes' describe "UDPSocket#write" do it "raises EMSGSIZE if msg is too long" do @@ -10,9 +10,9 @@ describe "UDPSocket#write" do s2 = UDPSocket.new s2.connect(host, s1.addr[1]) - lambda do + -> do s2.write('1' * 100_000) - end.should raise_error(Errno::EMSGSIZE) + end.should.raise(Errno::EMSGSIZE) ensure s1.close if s1 && !s1.closed? s2.close if s2 && !s2.closed? |
