summaryrefslogtreecommitdiff
path: root/spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb')
-rw-r--r--spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb b/spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb
index c112f2ab4a..4cd6e8bdca 100644
--- a/spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb
+++ b/spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb
@@ -18,7 +18,12 @@ describe 'BasicSocket#sendmsg_nonblock' do
describe 'without a destination address' do
it "raises #{SocketSpecs.dest_addr_req_error}" do
- -> { @client.sendmsg_nonblock('hello') }.should raise_error(SocketSpecs.dest_addr_req_error)
+ -> {
+ @client.sendmsg_nonblock('hello')
+ }.should.raise(SocketSpecs.dest_addr_req_error)
+ -> {
+ @client.sendmsg_nonblock('hello', exception: false)
+ }.should.raise(SocketSpecs.dest_addr_req_error)
end
end
@@ -96,7 +101,7 @@ describe 'BasicSocket#sendmsg_nonblock' do
it 'raises IO::WaitWritable when the underlying buffer is full' do
-> {
10.times { @client.sendmsg_nonblock('hello' * 1_000_000) }
- }.should raise_error(IO::WaitWritable)
+ }.should.raise(IO::WaitWritable)
end
it 'returns :wait_writable when the underlying buffer is full with exception: false' do
> * lib/erb.rb: ditto. * lib/mkmf.rb: ditto. * lib/net/http/response.rb: ditto. * lib/optparse/version.rb: ditto. * lib/prime.rb: ditto. * lib/racc/parser.rb: ditto. * lib/rexml/document.rb: ditto. * lib/rexml/dtd/dtd.rb: ditto. * lib/rexml/element.rb: ditto. * lib/rexml/functions.rb: ditto. * lib/rexml/parsers/xpathparser.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2014-06-10* lib/cgi/core.rb: Provide a mechanism to specify thexibbar max_multipart_length of multipart data. [Feature #8370] patch by Leif Eriksen <leif.eriksen.au@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2014-05-27* test/lib/minitest/unit.rb: Use Tempfile#close! instead ofakr Tempfile#unlink to close file descriptors. * test/openssl/test_config.rb: Ditto. * test/ruby/test_io.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2014-05-27* lib/cgi/core.rb: Use Tempfile#close(true) instead of Tempfile#unlinkakr to close file descriptors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2013-12-13* ext/socket/lib/socket.rb: Don't test $! in "ensure" clause becauseakr it may be set before the body. Reported by ko1 and mrkn. [ruby-core:59088] [Bug #9247] * lib/cgi/core.rb: Ditto. * lib/drb/ssl.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2013-05-16* lib/cgi/core.rb: Constant parameter is faster and economy thanxibbar string parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2013-04-11* lib/cgi/{core,html}.rb : Update define tagmakerxibbar because to delete eval. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2013-03-29code cleanup by @vipulnsward [GH fixes #267]hsbt * lib/cgi/core.rb: change each to each_value * ext/bigdecimal/lib/bigdecimal/{jacobian,math}.rb: remove unused variables from bigdecimal lib git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e