summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringio/sysread_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/stringio/sysread_spec.rb')
-rw-r--r--spec/ruby/library/stringio/sysread_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/ruby/library/stringio/sysread_spec.rb b/spec/ruby/library/stringio/sysread_spec.rb
index 8f78073f42..1403dab5cb 100644
--- a/spec/ruby/library/stringio/sysread_spec.rb
+++ b/spec/ruby/library/stringio/sysread_spec.rb
@@ -1,6 +1,7 @@
require_relative '../../spec_helper'
require "stringio"
require_relative 'shared/read'
+require_relative 'shared/sysread'
describe "StringIO#sysread when passed length, buffer" do
it_behaves_like :stringio_read, :sysread
@@ -32,6 +33,10 @@ describe "StringIO#sysread when passed nil" do
end
end
+describe "StringIO#sysread when passed length" do
+ it_behaves_like :stringio_sysread_length, :sysread
+end
+
describe "StringIO#sysread when passed [length]" do
before :each do
@io = StringIO.new("example")
@@ -39,7 +44,7 @@ describe "StringIO#sysread when passed [length]" do
it "raises an EOFError when self's position is at the end" do
@io.pos = 7
- -> { @io.sysread(10) }.should raise_error(EOFError)
+ -> { @io.sysread(10) }.should.raise(EOFError)
end
it "returns an empty String when length is 0" do