summaryrefslogtreecommitdiff
path: root/spec/ruby/core/io/write_nonblock_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/io/write_nonblock_spec.rb')
-rw-r--r--spec/ruby/core/io/write_nonblock_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/io/write_nonblock_spec.rb b/spec/ruby/core/io/write_nonblock_spec.rb
index 5bfc690f9b..a6bd43c058 100644
--- a/spec/ruby/core/io/write_nonblock_spec.rb
+++ b/spec/ruby/core/io/write_nonblock_spec.rb
@@ -44,7 +44,7 @@ platform_is_not :windows do
it "checks if the file is writable if writing zero bytes" do
-> {
@readonly_file.write_nonblock("")
- }.should raise_error(IOError)
+ }.should.raise(IOError)
end
end
@@ -67,12 +67,12 @@ describe 'IO#write_nonblock' do
it "raises an exception extending IO::WaitWritable when the write would block" do
-> {
loop { @write.write_nonblock('a' * 10_000) }
- }.should raise_error(IO::WaitWritable) { |e|
+ }.should.raise(IO::WaitWritable) { |e|
platform_is_not :windows do
- e.should be_kind_of(Errno::EAGAIN)
+ e.should.is_a?(Errno::EAGAIN)
end
platform_is :windows do
- e.should be_kind_of(Errno::EWOULDBLOCK)
+ e.should.is_a?(Errno::EWOULDBLOCK)
end
}
end